|
|
|
@@ -199,3 +199,29 @@ func TestOnlyATrysSelectionReachesTheScript(t *testing.T) {
|
|
|
|
|
t.Fatalf("a try's selection: %v", env)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// **Issue 1310**: the controller's module check prints its warning counts after its refusal; a failed check
|
|
|
|
|
// is said by the refusal, never by the count printed last.
|
|
|
|
|
func TestAFailedModuleCheckIsSaidByItsRefusalNotItsWarningCount(t *testing.T) {
|
|
|
|
|
log := "mesh-controller: 3 problem(s) in 139 manifest(s)\n" +
|
|
|
|
|
"mesh-files claims node-files and says it serves upload, download, which that seat's protocol does not promise\n" +
|
|
|
|
|
"minio claims the seat \"object-store\", which no module declares and the mesh does not define\n" +
|
|
|
|
|
"only-office claims the seat \"document-converter\", which no module declares and the mesh does not define\n" +
|
|
|
|
|
"adwaita: ok, 4 tool(s)\nlong-running resources without health: 59\n" +
|
|
|
|
|
"files asking for a setting without saying whether it is trusted: 36\n"
|
|
|
|
|
// 1310/AC1
|
|
|
|
|
want := "mesh-controller: 3 problem(s) in 139 manifest(s): mesh-files claims node-files and says it serves upload, " +
|
|
|
|
|
"download, which that seat's protocol does not promise"
|
|
|
|
|
if got := whatFailed(log); got != want {
|
|
|
|
|
t.Errorf("1310/AC1: the captured log is said as %q, not %q", got, want)
|
|
|
|
|
}
|
|
|
|
|
// 1310/AC2
|
|
|
|
|
if got, want := whatFailed("ok \tx/a\t1s\n--- FAIL: TestX (0.01s)\n x_test.go:12: got 1\nFAIL\nlong-running resources without health: 59\n"),
|
|
|
|
|
"--- FAIL: TestX (0.01s)"; got != want {
|
|
|
|
|
t.Errorf("1310/AC2: a failing test is said as %q, not %q", got, want)
|
|
|
|
|
}
|
|
|
|
|
// 1310/AC3
|
|
|
|
|
if got, want := whatFailed("starting\nsomething odd happened\n"), "something odd happened"; got != want {
|
|
|
|
|
t.Errorf("1310/AC3: a log with no failure line is said as %q, not %q", got, want)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|