test: fix cli reboot test

Fix the assertions on the reboot cli test to correctly assert the event messages in lowercase.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
This commit is contained in:
Utku Ozdemir 2022-08-30 12:23:24 +02:00
parent 0b339a9dc5
commit d283aba3a3
No known key found for this signature in database
GPG Key ID: 65933E76F0549B0D

View File

@ -43,14 +43,18 @@ func (suite *RebootSuite) TestReboot() {
) )
suite.RunCLI([]string{"reboot", "-n", nodes, "--debug"}, base.StdoutMatchFunc(func(stdout string) error { suite.RunCLI([]string{"reboot", "-n", nodes, "--debug"}, base.StdoutMatchFunc(func(stdout string) error {
if strings.Contains(stdout, "method is not supported") {
suite.T().Skip("reboot is not supported")
}
var err error var err error
for _, node := range []string{controlPlaneNode, workerNode} { for _, node := range []string{controlPlaneNode, workerNode} {
if !strings.Contains(stdout, fmt.Sprintf("%v: Events check condition met", node)) { if !strings.Contains(stdout, fmt.Sprintf("%v: events check condition met", node)) {
err = multierror.Append(err, fmt.Errorf("events check condition not met on %v", node)) err = multierror.Append(err, fmt.Errorf("events check condition not met on %v", node))
} }
if !strings.Contains(stdout, fmt.Sprintf("%v: Post check passed", node)) { if !strings.Contains(stdout, fmt.Sprintf("%v: post check passed", node)) {
err = multierror.Append(err, fmt.Errorf("post check not passed on %v", node)) err = multierror.Append(err, fmt.Errorf("post check not passed on %v", node))
} }
} }