Skip to content

Commit

Permalink
Trying to fix some tests...
Browse files Browse the repository at this point in the history
  • Loading branch information
beiske committed Apr 9, 2024
1 parent a05c714 commit 25df185
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions pkg/api/platformapi/instanceconfigapi/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func TestNewConfig(t *testing.T) {
8192,
},
},
AllowedZones: []string{},
},
},
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/api/platformapi/instanceconfigapi/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func TestCreate(t *testing.T) {
8192,
},
},
AllowedZones: []string{},
},
}},
want: &models.VersionedIDResponse{ID: ec.String("an autogenerated id")},
Expand Down Expand Up @@ -113,6 +114,7 @@ func TestCreate(t *testing.T) {
8192,
},
},
AllowedZones: []string{},
}},
},
want: &models.VersionedIDResponse{ID: ec.String("kibana")},
Expand All @@ -138,6 +140,7 @@ func TestCreate(t *testing.T) {
8192,
},
},
AllowedZones: []string{},
},
API: api.NewMock(mock.New500Response(mock.NewStringBody(`{"error": "some error"}`))),
}},
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/platformapi/instanceconfigapi/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func TestGet(t *testing.T) {
262144,
},
},
AllowedZones: []string{},
},
},
{
Expand Down Expand Up @@ -118,6 +119,7 @@ func TestGet(t *testing.T) {
8192,
},
},
AllowedZones: []string{},
},
},
{
Expand Down
6 changes: 4 additions & 2 deletions pkg/api/platformapi/instanceconfigapi/pull_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ func TestPullToDirectory(t *testing.T) {
"ingest",
"master"
],
"storage_multiplier": 32
"storage_multiplier": 32,
"allowed_zones": null
}
`,
"some-folder/kibana.json": `{
Expand All @@ -128,7 +129,8 @@ func TestPullToDirectory(t *testing.T) {
"id": "kibana",
"instance_type": "kibana",
"name": "kibana",
"storage_multiplier": 4
"storage_multiplier": 4,
"allowed_zones": null
}
`,
},
Expand Down
15 changes: 10 additions & 5 deletions pkg/api/platformapi/instanceconfigapi/testutil_responses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const listInstanceConfigsSuccess = `[{
"ingest",
"master"
],
"storage_multiplier": 32
"storage_multiplier": 32,
"allowed_zones": null
}, {
"description": "Instance configuration to be used for Kibana",
"discrete_sizes": {
Expand All @@ -59,7 +60,8 @@ const listInstanceConfigsSuccess = `[{
"instance_type": "kibana",
"name": "kibana",
"node_types": null,
"storage_multiplier": 4
"storage_multiplier": 4,
"allowed_zones": null
}]`

const getInstanceConfigsSuccess = `{
Expand Down Expand Up @@ -87,7 +89,8 @@ const getInstanceConfigsSuccess = `{
"ingest",
"master"
],
"storage_multiplier": 32
"storage_multiplier": 32,
"allowed_zones": null
}`

const getInstanceConfigsSuccessKibana = `{
Expand All @@ -106,7 +109,8 @@ const getInstanceConfigsSuccessKibana = `{
"instance_type": "kibana",
"name": "kibana",
"node_types": null,
"storage_multiplier": 4
"storage_multiplier": 4,
"allowed_zones": null
}`

const newConfigKibanaInstanceConfig = `{
Expand All @@ -125,5 +129,6 @@ const newConfigKibanaInstanceConfig = `{
"instance_type": "kibana",
"name": "kibana",
"node_types": [],
"storage_multiplier": 4
"storage_multiplier": 4,
"allowed_zones": null
}`
2 changes: 2 additions & 0 deletions pkg/api/platformapi/instanceconfigapi/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func TestUpdate(t *testing.T) {
8192,
},
},
AllowedZones: []string{},
},
}},
},
Expand All @@ -101,6 +102,7 @@ func TestUpdate(t *testing.T) {
8192,
},
},
AllowedZones: []string{},
},
API: api.NewMock(mock.New500Response(mock.NewStringBody(`{"error": "some error"}`))),
}},
Expand Down

0 comments on commit 25df185

Please sign in to comment.