(t *testing.T)
| 377 | } |
| 378 | |
| 379 | func TestVerify_FailFast(t *testing.T) { |
| 380 | tmpDir := createVerifyTestFiles(t) |
| 381 | resetVerifyFlags() |
| 382 | taskDir = tmpDir |
| 383 | verifyTaskID = "008" |
| 384 | |
| 385 | output, err := captureVerifyOutput(t) |
| 386 | if err == nil { |
| 387 | t.Fatal("expected error for failing check") |
| 388 | } |
| 389 | if !errors.Is(err, ErrVerifyFailed) { |
| 390 | t.Fatalf("expected ErrVerifyFailed, got: %v", err) |
| 391 | } |
| 392 | |
| 393 | if !strings.Contains(output, "FAIL") { |
| 394 | t.Errorf("expected FAIL in output, got: %s", output) |
| 395 | } |
| 396 | if !strings.Contains(output, "SKIP") { |
| 397 | t.Errorf("expected SKIP for remaining steps, got: %s", output) |
| 398 | } |
| 399 | // With fail-fast, only 1 step should fail and 2 should be skipped (not passed) |
| 400 | if strings.Contains(output, "PASS") { |
| 401 | t.Errorf("expected no PASS with fail-fast, but got: %s", output) |
| 402 | } |
| 403 | if !strings.Contains(output, "1 failed") { |
| 404 | t.Errorf("expected '1 failed' in output, got: %s", output) |
| 405 | } |
| 406 | if !strings.Contains(output, "2 skipped") { |
| 407 | t.Errorf("expected '2 skipped' in output, got: %s", output) |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | func TestVerify_All(t *testing.T) { |
| 412 | tmpDir := createVerifyTestFiles(t) |
nothing calls this directly
no test coverage detected