Skip to content

Commit 6f40df3

Browse files
committed
Add support to skip tests using labels
1 parent 98be901 commit 6f40df3

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

test/go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ require (
105105
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
106106
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
107107
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect
108-
github.com/hashicorp/golang-lru v0.5.4 // indirect
108+
github.com/hashicorp/golang-lru v0.5.1 // indirect
109109
github.com/heptiolabs/healthcheck v0.0.0-20211123025425-613501dd5deb // indirect
110110
github.com/imdario/mergo v0.3.12 // indirect
111111
github.com/inconshreveable/mousetrap v1.0.1 // indirect
@@ -155,8 +155,8 @@ require (
155155
github.com/xlab/treeprint v1.1.0 // indirect
156156
go.opencensus.io v0.24.0 // indirect
157157
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
158-
go.uber.org/atomic v1.8.0 // indirect
159-
golang.org/x/crypto v0.7.0 // indirect
158+
go.uber.org/atomic v1.7.0 // indirect
159+
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
160160
golang.org/x/mod v0.10.0 // indirect
161161
golang.org/x/net v0.10.0 // indirect
162162
golang.org/x/term v0.8.0 // indirect
@@ -167,7 +167,7 @@ require (
167167
google.golang.org/appengine v1.6.7 // indirect
168168
google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 // indirect
169169
gopkg.in/inf.v0 v0.9.1 // indirect
170-
gopkg.in/ini.v1 v1.62.0 // indirect
170+
gopkg.in/ini.v1 v1.57.0 // indirect
171171
gopkg.in/yaml.v2 v2.4.0 // indirect
172172
gopkg.in/yaml.v3 v3.0.1 // indirect
173173
honnef.co/go/tools v0.2.2 // indirect

test/go.sum

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/pkg/integration/setup.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ func Setup(ctx context.Context) (string, string, env.Environment, bool, string,
7979
assess string
8080
parallel bool
8181

82-
labels = make(flags.LabelsMap)
82+
labels = make(flags.LabelsMap)
83+
skipLabels = make(flags.LabelsMap)
8384
)
8485

8586
flagset := flag.CommandLine
@@ -99,6 +100,8 @@ func Setup(ctx context.Context) (string, string, env.Environment, bool, string,
99100
flagset.StringVar(&feature, "feature", "", "Regular expression that targets features to test")
100101
flagset.StringVar(&assess, "assess", "", "Regular expression that targets assertive steps to run")
101102
flagset.Var(&labels, "labels", "Comma-separated key/value pairs to filter tests by labels")
103+
flagset.Var(&skipLabels, "skip-labels", "Comma-separated key/value pairs to skip tests by labels")
104+
102105
if err := flagset.Parse(os.Args[1:]); err != nil {
103106
klog.Fatalf("cannot parse flags: %v", err)
104107
}
@@ -121,6 +124,7 @@ func Setup(ctx context.Context) (string, string, env.Environment, bool, string,
121124

122125
e.WithClient(client)
123126
e.WithLabels(labels)
127+
e.WithSkipLabels(skipLabels)
124128
e.WithNamespace(namespace)
125129

126130
// use the namespace from the CurrentContext

0 commit comments

Comments
 (0)