Skip to content

Commit

Permalink
Minor sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddlet2666 committed Oct 2, 2024
1 parent 42d09dc commit e63a0e5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -1129,17 +1129,16 @@ func RunTestCachesCommands(t *testing.T) {
_, err = test_utils.IssueGetRequest(restUrl + "/populateCacheStore")
g.Expect(err).To(BeNil())

test_utils.EnsureCommandContainsAll(g, t, cliCmd, "SERVICE,COUNT,SIZE,cache-1,cache-2", configArg, file,
"get", "caches", "-c", context.ClusterName)
expected := "SERVICE,COUNT,SIZE,cache-1,cache-2"

test_utils.EnsureCommandContainsAll(g, t, cliCmd, expected, configArg, file, "get", "caches", "-c", context.ClusterName)

// test table sorting
test_utils.EnsureCommandContainsAll(g, t, cliCmd, "SERVICE,COUNT,SIZE,cache-1,cache-2", configArg, file,
"get", "caches", "-c", context.ClusterName, "--sort", "COUNT")
test_utils.EnsureCommandContainsAll(g, t, cliCmd, expected, configArg, file, "get", "caches", "-c", context.ClusterName, "--sort", "COUNT")

test_utils.EnsureCommandContainsAll(g, t, cliCmd, "SERVICE,COUNT,SIZE,cache-1,cache-2", configArg, file,
"get", "caches", "-c", context.ClusterName, "--sort", "COUNT", "--desc")
test_utils.EnsureCommandContainsAll(g, t, cliCmd, expected, configArg, file, "get", "caches", "-c", context.ClusterName, "--sort", "COUNT", "--desc")

// reset the table soring
// reset the table sorting
cmd.ResetTableSorting()

// test cache-storage
Expand Down

0 comments on commit e63a0e5

Please sign in to comment.