Skip to content

Commit

Permalink
Merge pull request openshift#1935 from abhinavdahiya/bz-1725524
Browse files Browse the repository at this point in the history
 Bug 1725524: types/aws/default: move ap-northeast-2 to m5 instance class
  • Loading branch information
openshift-merge-robot authored Jul 2, 2019
2 parents 42d5e64 + 3085753 commit 11d12af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 6 additions & 5 deletions pkg/types/aws/defaults/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (

var (
defaultMachineClass = map[string]string{
"ap-east-1": "m5",
"eu-north-1": "m5",
"eu-west-3": "m5",
"us-gov-east-1": "m5",
"us-west-2": "m5",
"ap-east-1": "m5",
"ap-northeast-2": "m5",
"eu-north-1": "m5",
"eu-west-3": "m5",
"us-gov-east-1": "m5",
"us-west-2": "m5",
}
)

Expand Down
9 changes: 4 additions & 5 deletions platformtests/aws/default_instance_class_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func TestGetDefaultInstanceClass(t *testing.T) {
}

available := make(map[string]map[string]struct{}, len(preferredInstanceClasses))
var match string
var allowed []string

for _, instanceClass := range preferredInstanceClasses {
if _, ok := classes[instanceClass]; !ok {
Expand Down Expand Up @@ -164,17 +164,16 @@ func TestGetDefaultInstanceClass(t *testing.T) {
}

if reflect.DeepEqual(available[instanceClass], zones) {
match = instanceClass
break
allowed = append(allowed, instanceClass)
}
}

if match == "" {
if len(allowed) == 0 {
t.Fatalf("none of the preferred instance classes are fully supported: %v", available)
}

t.Log(available)
assert.Equal(t, defaults.InstanceClass(region), match)
assert.Contains(t, allowed, defaults.InstanceClass(region))
})
}
}

0 comments on commit 11d12af

Please sign in to comment.