Skip to content

Commit 83ce5dd

Browse files
committed
fix tag name attribute
1 parent 3c18726 commit 83ce5dd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cluster-autoscaler/cloudprovider/kamatera/kamatera_api_client_rest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ func (c *KamateraApiClientRest) getServerTags(ctx context.Context, serverName st
258258
tags := make([]string, 0)
259259
for _, row := range res.([]interface{}) {
260260
row := row.(map[string]interface{})
261-
tags = append(tags, row["tag name"].(string))
261+
tags = append(tags, row["tagName"].(string))
262262
}
263263
return tags, nil
264264
}

cluster-autoscaler/cloudprovider/kamatera/kamatera_api_client_rest_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func TestApiClientRest_ListServers(t *testing.T) {
7676
]`, newServerName1, cachedServerName2, cachedServerName3, cachedServerName4),
7777
).On("handle", "/server/tags").Return(
7878
"application/json",
79-
`[{"tag name": "test-tag"}, {"tag name": "other-test-tag"}]`,
79+
`[{"tagName": "test-tag"}, {"tagName": "other-test-tag"}]`,
8080
)
8181
servers, err := client.ListServers(ctx, map[string]*Instance{
8282
cachedServerName2: {
@@ -140,7 +140,7 @@ func TestApiClientRest_ListServersNamePrefix(t *testing.T) {
140140
]`, newServerName1, newServerName2),
141141
).On("handle", "/server/tags").Return(
142142
"application/json",
143-
`[{"tag name": "test-tag"}, {"tag name": "other-test-tag"}]`,
143+
`[{"tagName": "test-tag"}, {"tagName": "other-test-tag"}]`,
144144
)
145145
servers, err := client.ListServers(ctx, map[string]*Instance{}, "prefixb")
146146
assert.NoError(t, err)

0 commit comments

Comments
 (0)