Put quantity into packages
kubelet, GCE, validation, client
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/registrytest"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
@@ -372,8 +373,8 @@ func TestValidateManifest(t *testing.T) {
|
||||
Image: "image",
|
||||
Command: []string{"foo", "bar"},
|
||||
WorkingDir: "/tmp",
|
||||
Memory: 1,
|
||||
CPU: 1,
|
||||
Memory: *resource.Q("1"),
|
||||
CPU: *resource.Q("1"),
|
||||
Ports: []api.Port{
|
||||
{Name: "p1", ContainerPort: 80, HostPort: 8080},
|
||||
{Name: "p2", ContainerPort: 81},
|
||||
@@ -623,7 +624,7 @@ func TestValidatePodUpdate(t *testing.T) {
|
||||
Containers: []api.Container{
|
||||
{
|
||||
Image: "foo:V1",
|
||||
CPU: 100,
|
||||
CPU: *resource.Q("100m"),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -634,7 +635,7 @@ func TestValidatePodUpdate(t *testing.T) {
|
||||
Containers: []api.Container{
|
||||
{
|
||||
Image: "foo:V2",
|
||||
CPU: 1000,
|
||||
CPU: *resource.Q("1000m"),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1300,8 +1301,8 @@ func TestValidateMinionUpdate(t *testing.T) {
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Capacity: api.ResourceList{
|
||||
"cpu": util.NewIntOrStringFromInt(10000),
|
||||
"memory": util.NewIntOrStringFromInt(100),
|
||||
api.ResourceCPU: *resource.Q("10000"),
|
||||
api.ResourceMemory: *resource.Q("100"),
|
||||
},
|
||||
},
|
||||
}, api.Node{
|
||||
@@ -1310,8 +1311,8 @@ func TestValidateMinionUpdate(t *testing.T) {
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Capacity: api.ResourceList{
|
||||
"cpu": util.NewIntOrStringFromInt(100),
|
||||
"memory": util.NewIntOrStringFromInt(10000),
|
||||
api.ResourceCPU: *resource.Q("100"),
|
||||
api.ResourceMemory: *resource.Q("10000"),
|
||||
},
|
||||
},
|
||||
}, true},
|
||||
@@ -1322,8 +1323,8 @@ func TestValidateMinionUpdate(t *testing.T) {
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Capacity: api.ResourceList{
|
||||
"cpu": util.NewIntOrStringFromInt(10000),
|
||||
"memory": util.NewIntOrStringFromInt(100),
|
||||
api.ResourceCPU: *resource.Q("10000"),
|
||||
api.ResourceMemory: *resource.Q("100"),
|
||||
},
|
||||
},
|
||||
}, api.Node{
|
||||
@@ -1333,8 +1334,8 @@ func TestValidateMinionUpdate(t *testing.T) {
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Capacity: api.ResourceList{
|
||||
"cpu": util.NewIntOrStringFromInt(100),
|
||||
"memory": util.NewIntOrStringFromInt(10000),
|
||||
api.ResourceCPU: *resource.Q("100"),
|
||||
api.ResourceMemory: *resource.Q("10000"),
|
||||
},
|
||||
},
|
||||
}, true},
|
||||
|
Reference in New Issue
Block a user