mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-18 19:11:12 +02:00
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:
parent
0b339a9dc5
commit
d283aba3a3
@ -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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user