Skip to content

Commit

Permalink
[YUNIKORN-2045] unify DeepEqual (#695)
Browse files Browse the repository at this point in the history
Closes: #695

Signed-off-by: Peter Bacsko <[email protected]>
  • Loading branch information
steinsgateted authored and pbacsko committed Oct 23, 2023
1 parent c7d2c7c commit dc7794a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/appmgmt/general/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
3 changes: 1 addition & 2 deletions pkg/cache/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package cache

import (
"fmt"
"reflect"
"sort"
"strings"
"sync"
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/common/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit dc7794a

Please sign in to comment.