This is an automated email from the ASF dual-hosted git repository.
pbacsko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git
The following commit(s) were added to refs/heads/master by this push:
new dc7794ac [YUNIKORN-2045] unify DeepEqual (#695)
dc7794ac is described below
commit dc7794ac498dce4b39141c3beabe9dcaa39f6a15
Author: steinsgateted <[email protected]>
AuthorDate: Mon Oct 23 22:51:47 2023 +0200
[YUNIKORN-2045] unify DeepEqual (#695)
Closes: #695
Signed-off-by: Peter Bacsko <[email protected]>
---
pkg/appmgmt/general/metadata_test.go | 2 +-
pkg/cache/application_test.go | 3 +--
pkg/common/utils/utils_test.go | 4 ++--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/pkg/appmgmt/general/metadata_test.go
b/pkg/appmgmt/general/metadata_test.go
index 9d8a43cc..c3cf45b5 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 49f882f5..d4c7ebf4 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 35ee7a3a..72946754 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) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]