feat: bootstrap durable server store
This commit is contained in:
@@ -112,6 +112,34 @@ func TestIntegrationResumeValidation_HP_CFG_01(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBoundedSuiteLogAndFailedRunRecovery_BH_STORE_03(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
capture := &limitedCapture{limit: 4}
|
||||
if written, err := capture.Write([]byte("123456")); err != nil || written != 6 {
|
||||
t.Fatalf("Write = (%d, %v)", written, err)
|
||||
}
|
||||
if got := string(capture.Bytes()); !strings.HasPrefix(got, "1234\n") || !strings.Contains(got, "truncated") {
|
||||
t.Fatalf("bounded output = %q", got)
|
||||
}
|
||||
|
||||
h := &harness{root: t.TempDir(), now: time.Now, out: &bytes.Buffer{}}
|
||||
current, err := h.create("failed-store", "integration", "store")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := h.transition(current, "failed", "store-failed", "injected"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := h.environmentCommand("recover", []string{"--run-id", current.RunID}); err != nil {
|
||||
t.Fatalf("recover failed run: %v", err)
|
||||
}
|
||||
loaded, err := h.load(current.RunID)
|
||||
if err != nil || loaded.Phase != "ready" {
|
||||
t.Fatalf("recovered run = (%+v, %v)", loaded, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCoverageInventoryReferencesExistingTests_HP_CFG_01(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user