Skip to content

Commit

Permalink
test: Minor refactors to TestStoppedWorkflow ArtifactGC test. Fixes a…
Browse files Browse the repository at this point in the history
…rgoproj#11879

Signed-off-by: Garett MacGowan <garettsoftware@gmail.com>
  • Loading branch information
Garett-MacGowan committed Oct 11, 2023
1 parent a0aa696 commit b328314
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
15 changes: 1 addition & 14 deletions test/e2e/artifacts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,7 @@ func (s *ArtifactsSuite) TestStoppedWorkflow() {

when.
DeleteWorkflow().
WaitForWorkflow(
fixtures.WorkflowCompletionOkay(true),
fixtures.Condition(func(wf *wfv1.Workflow) (bool, string) {

condition := "for artifact to not exist"

_, err = c.StatObject(context.Background(), "my-bucket-3", "on-deletion-wf-stopped", minio.StatObjectOptions{})

if err != nil {
return true, condition
}

return false, condition
}))
WaitForWorkflowDeletion()

then = when.Then()

Expand Down
12 changes: 3 additions & 9 deletions test/e2e/testdata/artifactgc/artgc-dag-wf-stopped.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ spec:
resources:
requests:
storage: 1Gi
# How long to keep workflows around after they have completed https://argoproj.github.io/argo-workflows/fields/#ttlstrategy
# ttlStrategy:
# # 30 seconds
# secondsAfterCompletion: 30
# secondsAfterSuccess: 30
# secondsAfterFailure: 30
# podGC:
# deleteDelayDuration: 15s
# strategy: "OnWorkflowCompletion"
templates:
- name: artgc-dag-wf-stopped-main
dag:
Expand Down Expand Up @@ -72,6 +63,9 @@ spec:
- --namespace=argo
- --loglevel=debug
- name: artgc-dag-artifact-creator
metadata:
labels:
template: "artgc-dag-artifact-creator"
container:
image: alpine:latest
volumeMounts:
Expand Down

0 comments on commit b328314

Please sign in to comment.