Skip to content

Commit 83bf647

Browse files
test(tui): use assert.Contains after the develop merge
develop (#160) moved the TUI tests to testify and removed the contains helper the removal tests used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a10195a commit 83bf647

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎services/nvpair-tui/ui/toast_test.go‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,7 @@ func TestRemoveMemberForgetsItsManualEntry(t *testing.T) {
429429

430430
wantCall(t, calls, "nodes:remove", "nodeUuid", "peer")
431431
wantCall(t, calls, "node/remove", "id", "manual:10.0.0.2")
432-
if got := v.status.render(); !contains(got, "remove peer ok") {
433-
t.Errorf("status = %q, want the removal reported", got)
434-
}
432+
assert.Contains(t, v.status.render(), "remove peer ok", "the removal is reported")
435433
}
436434

437435
// TestFailedRemoveMemberKeepsItsManualEntry checks a peer the cluster manager
@@ -449,9 +447,7 @@ func TestFailedRemoveMemberKeepsItsManualEntry(t *testing.T) {
449447
t.Errorf("a failed un-pairing went on to call %s", c.method)
450448
default:
451449
}
452-
if got := v.status.render(); !contains(got, "remove peer failed") {
453-
t.Errorf("status = %q, want the failure reported", got)
454-
}
450+
assert.Contains(t, v.status.render(), "remove peer failed", "the failure is reported")
455451
}
456452

457453
// TestNodesViewExplainsAnEmptyTable is the guard for the worst first

0 commit comments

Comments
 (0)