diff --git a/util/kube/kube_test.go b/util/kube/kube_test.go index fb7ebe08d4486..b25ee41436b2b 100644 --- a/util/kube/kube_test.go +++ b/util/kube/kube_test.go @@ -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, "", " ") @@ -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, "", " ") @@ -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, "", " ") @@ -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, "", " ") @@ -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)) }