Skip to content

Commit

Permalink
Improve *_checkcmds tests to ease debug
Browse files Browse the repository at this point in the history
  • Loading branch information
upils committed Jan 26, 2024
1 parent 7cefd5b commit 2c907b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/statemachine/classic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3827,7 +3827,7 @@ func TestStateMachine_installPackages_checkcmds(t *testing.T) {

gotCmds := strings.Split(strings.TrimSpace(string(readStdout)), "\n")
if len(expectedCmds) != len(gotCmds) {
t.Fatalf("%v commands to be executed, expected %v", len(gotCmds), len(expectedCmds))
t.Fatalf("%v commands to be executed, expected %v commands. Got: %v", len(gotCmds), len(expectedCmds), gotCmds)
}

for i, gotCmd := range gotCmds {
Expand Down Expand Up @@ -3890,7 +3890,7 @@ func TestStateMachine_installPackages_checkcmds_failing(t *testing.T) {

gotCmds := strings.Split(strings.TrimSpace(string(readStdout)), "\n")
if len(expectedCmds) != len(gotCmds) {
t.Fatalf("%v commands to be executed, expected %v", len(gotCmds), len(expectedCmds))
t.Fatalf("%v commands to be executed, expected %v commands. Got: %v", len(gotCmds), len(expectedCmds), gotCmds)
}

for i, gotCmd := range gotCmds {
Expand Down
2 changes: 1 addition & 1 deletion internal/statemachine/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ func TestStateMachine_updateGrub_checkcmds(t *testing.T) {

gotCmds := strings.Split(strings.TrimSpace(string(readStdout)), "\n")
if len(expectedCmds) != len(gotCmds) {
t.Fatalf("%v commands to be executed, expected %v", len(gotCmds), len(expectedCmds))
t.Fatalf("%v commands to be executed, expected %v commands. Got: %v", len(gotCmds), len(expectedCmds), gotCmds)
}

for i, gotCmd := range gotCmds {
Expand Down

0 comments on commit 2c907b2

Please sign in to comment.