diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-10 22:48:52 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-10 22:48:52 +0300 |
| commit | e1fc836f4cddfc51539ec92a79682523816152c2 (patch) | |
| tree | ca27b15f1ad9981f52d5f4b070fbde31b8e5777c /integrationtests/interactive_runtime_query_test.go | |
| parent | e657c7b5cb5bb9675c7817b34a7333bdf259415c (diff) | |
task 80: tighten runtime query integration coverage
Diffstat (limited to 'integrationtests/interactive_runtime_query_test.go')
| -rw-r--r-- | integrationtests/interactive_runtime_query_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/integrationtests/interactive_runtime_query_test.go b/integrationtests/interactive_runtime_query_test.go index 6ca2cef..bf9186b 100644 --- a/integrationtests/interactive_runtime_query_test.go +++ b/integrationtests/interactive_runtime_query_test.go @@ -150,6 +150,7 @@ func TestDTailInteractiveReloadReusesSessionOnImmediateBoundaryAndDropsLateOldMa return } writerDone <- appendLinesOnSchedule(ctx, followFile, []interactiveStep{ + {Delay: 250 * time.Millisecond, Input: "ERROR boundary"}, {Delay: 1500 * time.Millisecond, Input: "ERROR late"}, {Delay: 1700 * time.Millisecond, Input: "WARN live"}, }) @@ -181,12 +182,18 @@ func TestDTailInteractiveReloadReusesSessionOnImmediateBoundaryAndDropsLateOldMa if !strings.Contains(clientOutput, "WARN live") { t.Fatalf("expected WARN line after reload in output:\n%s", clientOutput) } + if !strings.Contains(clientOutput, "ERROR boundary") { + t.Fatalf("expected first-generation ERROR line before reload in output:\n%s", clientOutput) + } if strings.Contains(clientOutput, "ERROR late") { t.Fatalf("unexpected stale ERROR line after reload:\n%s", clientOutput) } if !strings.Contains(clientOutput, "reload applied successfully") { t.Fatalf("expected reload success message in output:\n%s", clientOutput) } + if boundaryIdx := strings.Index(clientOutput, "ERROR boundary"); boundaryIdx == -1 || boundaryIdx > strings.Index(clientOutput, "reload applied successfully") { + t.Fatalf("expected first-generation ERROR output to precede reload success:\n%s", clientOutput) + } if countSubstring(serverLogs.snapshot(), "Creating new server handler") != 1 { t.Fatalf("expected one SSH session on the server, logs:\n%s", strings.Join(serverLogs.snapshot(), "\n")) } |
