diff --git a/pkg/appmgmt/general/metadata_test.go b/pkg/appmgmt/general/metadata_test.go index 9d8a43cca..c3cf45b5a 100644 --- a/pkg/appmgmt/general/metadata_test.go +++ b/pkg/appmgmt/general/metadata_test.go @@ -160,7 +160,7 @@ func TestGetAppMetadata(t *testing.T) { //nolint:funlen assert.Equal(t, app.User, constants.DefaultUser) assert.Equal(t, app.Tags["application.stateaware.disable"], "true") assert.Equal(t, app.Tags["namespace"], "app-namespace-01") - assert.DeepEqual(t, len(app.TaskGroups), 0) + assert.Equal(t, len(app.TaskGroups), 0) assert.Equal(t, app.SchedulingPolicyParameters.GetGangSchedulingStyle(), "Hard") pod = v1.Pod{ diff --git a/pkg/cache/application_test.go b/pkg/cache/application_test.go index 49f882f58..d4c7ebf40 100644 --- a/pkg/cache/application_test.go +++ b/pkg/cache/application_test.go @@ -20,7 +20,6 @@ package cache import ( "fmt" - "reflect" "sort" "strings" "sync" @@ -62,7 +61,7 @@ func TestNewApplication(t *testing.T) { assert.Equal(t, len(app.taskMap), 0) assert.Equal(t, app.GetApplicationState(), ApplicationStates().New) assert.Equal(t, app.queue, "root.queue") - assert.Assert(t, reflect.DeepEqual(app.groups, []string{"dev", "yunikorn"})) + assert.DeepEqual(t, app.groups, []string{"dev", "yunikorn"}) } func TestSubmitApplication(t *testing.T) { diff --git a/pkg/common/utils/utils_test.go b/pkg/common/utils/utils_test.go index 35ee7a3ad..729467548 100644 --- a/pkg/common/utils/utils_test.go +++ b/pkg/common/utils/utils_test.go @@ -667,7 +667,7 @@ func TestGetUserFromPodLabel(t *testing.T) { } userID, _ := GetUserFromPod(tc.pod) - assert.DeepEqual(t, userID, tc.expectedUser) + assert.Equal(t, userID, tc.expectedUser) // The order of test cases is allowed to impact other test case. conf.UserLabelKey = constants.DefaultUserLabel }) @@ -1157,7 +1157,7 @@ func TestGzipCompressedConfigMap(t *testing.T) { {Data: map[string]string{conf.CMSvcClusterID: "new"}, BinaryData: map[string][]byte{"queues.yaml.gz": encodedConfigString}}, }) config := GetCoreSchedulerConfigFromConfigMap(confMap) - assert.DeepEqual(t, configs.DefaultSchedulerConfig, config) + assert.Equal(t, configs.DefaultSchedulerConfig, config) } func TestGetExtraConfigFromConfigMapNil(t *testing.T) {