Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrKuzmitsky committed Dec 14, 2022
1 parent c78c48d commit 3fc8a52
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions util/kube/kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestSetLabels(t *testing.T) {
err := yaml.Unmarshal([]byte(yamlStr), &obj)
assert.Nil(t, err)

err = SetAppInstanceLabel(&obj, common.LabelKeyAppInstance, "my-app")
err = SetAppLabel(&obj, common.LabelKeyAppInstance, "my-app")
assert.Nil(t, err)

manifestBytes, err := json.MarshalIndent(obj.Object, "", " ")
Expand Down Expand Up @@ -89,7 +89,7 @@ func TestSetLegacyLabels(t *testing.T) {
err := yaml.Unmarshal([]byte(yamlStr), &obj)
assert.Nil(t, err)

err = SetAppInstanceLabel(&obj, common.LabelKeyLegacyApplicationName, "my-app")
err = SetAppLabel(&obj, common.LabelKeyLegacyApplicationName, "my-app")
assert.Nil(t, err)

manifestBytes, err := json.MarshalIndent(obj.Object, "", " ")
Expand All @@ -113,7 +113,7 @@ func TestSetLegacyJobLabel(t *testing.T) {
var obj unstructured.Unstructured
err = yaml.Unmarshal(yamlBytes, &obj)
assert.Nil(t, err)
err = SetAppInstanceLabel(&obj, common.LabelKeyLegacyApplicationName, "my-app")
err = SetAppLabel(&obj, common.LabelKeyLegacyApplicationName, "my-app")
assert.Nil(t, err)

manifestBytes, err := json.MarshalIndent(obj.Object, "", " ")
Expand All @@ -139,7 +139,7 @@ func TestSetSvcLabel(t *testing.T) {
var obj unstructured.Unstructured
err = yaml.Unmarshal(yamlBytes, &obj)
assert.Nil(t, err)
err = SetAppInstanceLabel(&obj, common.LabelKeyAppInstance, "my-app")
err = SetAppLabel(&obj, common.LabelKeyAppInstance, "my-app")
assert.Nil(t, err)

manifestBytes, err := json.MarshalIndent(obj.Object, "", " ")
Expand Down Expand Up @@ -202,7 +202,7 @@ func TestGetAppInstanceLabel(t *testing.T) {
var obj unstructured.Unstructured
err = yaml.Unmarshal(yamlBytes, &obj)
assert.Nil(t, err)
err = SetAppInstanceLabel(&obj, common.LabelKeyAppInstance, "my-app")
err = SetAppLabel(&obj, common.LabelKeyAppInstance, "my-app")
assert.Nil(t, err)
assert.Equal(t, "my-app", GetAppInstanceLabel(&obj, common.LabelKeyAppInstance))
}
Expand Down

0 comments on commit 3fc8a52

Please sign in to comment.