(ctx context.Context, want bool)
| 266 | } |
| 267 | |
| 268 | func processTaskCompletedStatus(ctx context.Context, want bool) error { |
| 269 | c := testenv.FetchState[ClusterState](ctx) |
| 270 | |
| 271 | if err := mustBeUp(ctx, *c); err != nil { |
| 272 | return err |
| 273 | } |
| 274 | |
| 275 | got, err := c.cluster.AwaitUntilTaskIsDone(ctx) |
| 276 | if err != nil { |
| 277 | return err |
| 278 | } |
| 279 | |
| 280 | if got != want { |
| 281 | if err := logTaskOutput(ctx, *c); err != nil { |
| 282 | return err |
| 283 | } |
| 284 | return fmt.Errorf("the TaskRun did not complete as expected: want=%v, got=%v", want, got) |
| 285 | } |
| 286 | |
| 287 | return nil |
| 288 | } |
| 289 | |
| 290 | func logTaskOutput(ctx context.Context, c ClusterState) error { |
| 291 | info, err := c.cluster.TaskInfo(ctx) |
no test coverage detected