Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ldx committed Dec 19, 2020
1 parent 8f1bfa5 commit 0ab38e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pkg/server/registry/pod_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestCreatePodInstanceFromResources(t *testing.T) {
assert.Nil(t, err)
p2, err := podRegistry.GetPod(p1.Name)
assert.Nil(t, err)
assert.Equal(t, "a1.medium", p2.Spec.InstanceType)
assert.Equal(t, "m1.small", p2.Spec.InstanceType)
}

func TestPodPhaseUpdateUpdatesTime(t *testing.T) {
Expand Down
22 changes: 11 additions & 11 deletions pkg/util/instanceselector/instanceselector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestHappy(t *testing.T) {
ps.Resources.DedicatedCPU = true
inst, sustainedCPU, err := ResourcesToInstanceType(&ps)
assert.NoError(t, err)
assert.Equal(t, "a1.medium", inst)
assert.Equal(t, "m1.small", inst)
assert.False(t, *sustainedCPU)
ps.Resources = api.ResourceSpec{}
inst, sustainedCPU, err = ResourcesToInstanceType(&ps)
Expand Down Expand Up @@ -152,23 +152,23 @@ func TestAWSResourcesToInstanceType(t *testing.T) {
},
{
Resources: api.ResourceSpec{Memory: "0.5Gi", CPU: "1.0"},
instanceType: "a1.medium",
instanceType: "m1.small",
sustainedCPU: false,
},
{
Resources: api.ResourceSpec{Memory: "2.0Gi", CPU: "1.0"},
instanceType: "a1.medium",
sustainedCPU: false,
instanceType: "t3a.small",
sustainedCPU: true,
},
{
Resources: api.ResourceSpec{Memory: "4.0Gi", CPU: "1.0"},
instanceType: "m6g.medium",
sustainedCPU: false,
instanceType: "t3a.medium",
sustainedCPU: true,
},
{
Resources: api.ResourceSpec{Memory: "1.5Gi", CPU: "1.5"},
instanceType: "a1.large",
sustainedCPU: false,
instanceType: "t3a.small",
sustainedCPU: true,
},
{
Resources: api.ResourceSpec{Memory: "4.0Gi", CPU: "1.0", GPU: "1"},
Expand All @@ -177,17 +177,17 @@ func TestAWSResourcesToInstanceType(t *testing.T) {
},
{
Resources: api.ResourceSpec{Memory: "180.0Gi", CPU: "48.0"},
instanceType: "m6g.12xlarge",
instanceType: "m5a.12xlarge",
sustainedCPU: false,
},
{
Resources: api.ResourceSpec{Memory: "15.0Gi", CPU: "32.0"},
instanceType: "c6g.8xlarge",
instanceType: "c5a.8xlarge",
sustainedCPU: false,
},
{
Resources: api.ResourceSpec{Memory: "1Gi", CPU: "1.0", SustainedCPU: &f},
instanceType: "a1.medium",
instanceType: "m1.small",
sustainedCPU: false,
},
{
Expand Down

0 comments on commit 0ab38e6

Please sign in to comment.