Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(test-suite): waitRollout returns on err (#9987)

p0nya24040012538
diff --git a/backend/tests/rollout.go b/backend/tests/rollout.go
index 2a9ed9027f..582be10967 100644
--- a/backend/tests/rollout.go
+++ b/backend/tests/rollout.go
@@ -116,7 +116,6 @@ func (ctl *controller) waitRollout(ctx context.Context, issueName, rolloutName s
if err != nil {
return err
}
- var anyError error
completed := true
var runTasks []string
for _, stage := range rollout.Stages {
@@ -135,7 +134,7 @@ func (ctl *controller) waitRollout(ctx context.Context, issueName, rolloutName s
return err
}
if len(resp.TaskRuns) > 0 {
- anyError = errors.Errorf(resp.TaskRuns[0].Detail)
+ return errors.Errorf(resp.TaskRuns[0].Detail)
}
default:
completed = false
@@ -155,7 +154,7 @@ func (ctl *controller) waitRollout(ctx context.Context, issueName, rolloutName s
}
if completed {
- return anyError
+ break
}
}
return nil