Skip to content

Commit

Permalink
Fixed failed tests
Browse files Browse the repository at this point in the history
Signed-off-by: Niharika Bhavaraju <[email protected]>
  • Loading branch information
niharikabhavaraju committed Jan 29, 2025
1 parent a3f6549 commit 23b0bd3
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions go/integTest/cluster_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,9 @@ func (suite *GlideTestSuite) TestClusterCustomCommandWithRoute_Info() {
result, err := client.CustomCommandWithRoute([]string{"INFO"}, route)
assert.Nil(suite.T(), err)
assert.True(suite.T(), result.IsMultiValue())

multiValue := result.MultiValue()
for nodeName, value := range multiValue {
assert.True(suite.T(), strings.Contains(value.(string), "# Stats"), "Node %s info should contain '# Stats'", nodeName)
for _, value := range multiValue {
assert.True(suite.T(), strings.Contains(value.(string), "# Stats"))
}
}

Expand All @@ -143,12 +142,8 @@ func (suite *GlideTestSuite) TestClusterCustomCommandWithRoute_AllNodes() {
route := config.SimpleNodeRoute(config.AllNodes)
result, err := client.CustomCommandWithRoute([]string{"PING"}, route)
assert.Nil(suite.T(), err)
assert.True(suite.T(), result.IsMultiValue())

multiValue := result.MultiValue()
for nodeName, value := range multiValue {
assert.Equal(suite.T(), "PONG", value.(string), "Node %s should return 'PONG'", nodeName)
}
assert.True(suite.T(), result.IsSingleValue())
assert.Equal(suite.T(), "PONG", result.SingleValue())
}

func (suite *GlideTestSuite) TestPingWithOptions_NoRoute() {
Expand Down

0 comments on commit 23b0bd3

Please sign in to comment.