File tree Expand file tree Collapse file tree 3 files changed +37
-4
lines changed
Expand file tree Collapse file tree 3 files changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -262,9 +262,11 @@ jobs:
262262 profile : minimal
263263 use-api : false
264264 retries : 0
265+ # Example tests are not retryable withou a controller restart
265266 - test : test-examples
266267 profile : minimal
267268 use-api : false
269+ retries : 0
268270 - test : test-plugins
269271 profile : plugins
270272 use-api : false
Original file line number Diff line number Diff line change 33package e2e
44
55import (
6+ "strconv"
67 "testing"
78
89 "github.com/stretchr/testify/suite"
@@ -30,14 +31,33 @@ func (s *ExamplesSuite) TestExampleWorkflows() {
3031 s .T ().Fatalf ("Error parsing %s: %v" , path , err )
3132 }
3233 for _ , wf := range wfs {
33- if _ , ok := wf .GetLabels ()["workflows.argoproj.io/test" ]; ok {
34- s .T ().Logf ("Found example workflow at %s with test label\n " , path )
34+ isTestBroken := false
35+ isEvironmentNotReady := false
36+ isTestBrokenRaw , noTestBrokenLabelExists := wf .GetLabels ()["workflows.argoproj.io/no-test-broken" ]
37+ if noTestBrokenLabelExists {
38+ isTestBroken , err = strconv .ParseBool (isTestBrokenRaw )
39+ if err != nil {
40+ s .T ().Fatalf ("Error parsing annotation \" workflows.argoproj.io/no-test-broken\" : %v" , err )
41+ }
42+ }
43+ isEvironmentNotReadyRaw , noTestBrokenEnvironmentLabelExists := wf .GetLabels ()["workflows.argoproj.io/no-test-environment" ]
44+ if noTestBrokenEnvironmentLabelExists {
45+ isEvironmentNotReady , err = strconv .ParseBool (isEvironmentNotReadyRaw )
46+ if err != nil {
47+ s .T ().Fatalf ("Error parsing annotation \" workflows.argoproj.io/no-test-environment\" : %v" , err )
48+ }
49+ }
50+ if isTestBroken || isEvironmentNotReady {
51+ continue
52+ }
53+ s .T ().Run (path , func (t * testing.T ) {
54+ s .T ().Logf ("Found example workflow at %s\n " , path )
3555 s .Given ().
3656 ExampleWorkflow (& wf ).
3757 When ().
3858 SubmitWorkflow ().
3959 WaitForWorkflow (fixtures .ToBeSucceeded )
40- }
60+ })
4161 }
4262 return nil
4363 })
Original file line number Diff line number Diff line change @@ -136,7 +136,18 @@ func (g *Given) checkImages(wf interface{}, isExample bool) {
136136 image == "argoproj/argosay:v1" ||
137137 image == "argoproj/argosay:v2" ||
138138 image == "quay.io/argoproj/argocli:latest" ||
139- (isExample && (image == "busybox" || image == "python:alpine3.6" ))
139+ (isExample && (image == "busybox" ||
140+ image == "python:alpine3.6" ||
141+ image == "golang:1.18" ||
142+ image == "nginx:1.13" ||
143+ image == "curlimages/curl:latest" ||
144+ image == "node:9.1-alpine" ||
145+ image == "docker:19.03.13" ||
146+ image == "docker:19.03.13-dind" ||
147+ image == "alpine/git:v2.26.2" ||
148+ image == "alpine:3.6" ||
149+ image == "stedolan/jq:latest" ||
150+ image == "influxdb:1.2" ))
140151 }
141152 for _ , t := range templates {
142153 container := t .Container
You can’t perform that action at this time.
0 commit comments