Skip to content

Commit

Permalink
fix neco-reboter_test.go to use strimgs.TrimSpace
Browse files Browse the repository at this point in the history
  • Loading branch information
YZ775 committed Sep 11, 2024
1 parent f20f197 commit c32b222
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dctest/neco-rebooter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func testNecoRebooter() {
if len(stdout) == 0 {
return errors.New("no leader")
}
leaderNodeBefore = strings.TrimSuffix(string(stdout), "\n")
leaderNodeBefore = strings.TrimSpace(string(stdout))
return nil
}).Should(Succeed())

Expand All @@ -40,7 +40,7 @@ func testNecoRebooter() {
if len(stdout) == 0 {
return errors.New("no leader")
}
leaderNodeAfter := strings.TrimSuffix(string(stdout), "\n")
leaderNodeAfter := strings.TrimSpace(string(stdout))
if leaderNodeAfter == leaderNodeBefore {
return errors.New("leader is not changed")
}
Expand Down

0 comments on commit c32b222

Please sign in to comment.