Configure full Docker setup and confirm consequential actions
This commit is contained in:
@@ -42,7 +42,7 @@ func TestCLIHeadlessRunInspectionCancellationAndRPC(t *testing.T) {
|
||||
err := app.Run(ctx, append([]string{"--url", url}, args...))
|
||||
return out.String(), err
|
||||
}
|
||||
output, err := run("run", "workflow", "exact task", "--json", "--request-key", "same-key")
|
||||
output, err := run("run", "workflow", "exact task", "--yes", "--json", "--request-key", "same-key")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -88,7 +88,7 @@ func TestCLIHeadlessRunInspectionCancellationAndRPC(t *testing.T) {
|
||||
if _, err = run("run", "workflow", "exact task", "--yes", "--json", "--request-key", "same-key", "--wait", "--timeout", "100ms"); err == nil || !strings.Contains(err.Error(), "remains active") {
|
||||
t.Fatal("wait timeout canceled or incorrectly succeeded", err)
|
||||
}
|
||||
if _, err = run("cancel", "1", "--json"); err != nil {
|
||||
if _, err = run("cancel", "1", "--yes", "--json"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
r.wg.Wait()
|
||||
|
||||
@@ -166,7 +166,14 @@ func TestRetryReplaysInitialInputAndPinnedVersionThroughCLI(t *testing.T) {
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
result, err := runCLI("retry", fmt.Sprint(original.ID), "--json", "--wait", "--timeout", "5s", "--request-key", "retry-key")
|
||||
if _, err := runCLI("retry", fmt.Sprint(original.ID), "--json"); err == nil || !strings.Contains(err.Error(), "action canceled") {
|
||||
t.Fatal("unconfirmed retry accepted", err)
|
||||
}
|
||||
beforeRetry, err := store.ListRuns(ctx)
|
||||
if err != nil || len(beforeRetry) != 1 {
|
||||
t.Fatal("unconfirmed retry created a run", err)
|
||||
}
|
||||
result, err := runCLI("retry", fmt.Sprint(original.ID), "--yes", "--json", "--wait", "--timeout", "5s", "--request-key", "retry-key")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -175,7 +182,7 @@ func TestRetryReplaysInitialInputAndPinnedVersionThroughCLI(t *testing.T) {
|
||||
t.Fatal("retry did not preserve recorded run settings", retried)
|
||||
}
|
||||
r.wg.Wait()
|
||||
again, err := runCLI("retry", fmt.Sprint(original.ID), "--json", "--request-key", "retry-key")
|
||||
again, err := runCLI("retry", fmt.Sprint(original.ID), "--yes", "--json", "--request-key", "retry-key")
|
||||
if err != nil || again.RunDetail.ID != retried.ID {
|
||||
t.Fatal("retry lost idempotency", again, err)
|
||||
}
|
||||
@@ -183,7 +190,7 @@ func TestRetryReplaysInitialInputAndPinnedVersionThroughCLI(t *testing.T) {
|
||||
if err != nil || !reflect.DeepEqual(original, unchanged) {
|
||||
t.Fatal("retry modified failed history", unchanged, err)
|
||||
}
|
||||
if _, err := runCLI("retry", fmt.Sprint(retried.ID), "--json"); err == nil {
|
||||
if _, err := runCLI("retry", fmt.Sprint(retried.ID), "--yes", "--json"); err == nil {
|
||||
t.Fatal("succeeded run accepted for retry")
|
||||
}
|
||||
if _, err := r.retry(protocol.Message{RunID: original.ID}); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user