Skip to content

Commit 0df8716

Browse files
committed
ci(test): skip skipped tests from the Test JUnit output
1 parent 56f5d90 commit 0df8716

File tree

7 files changed

+19
-6
lines changed

7 files changed

+19
-6
lines changed

.buildkite/scripts/buildkite-integration-tests.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ asdf install
2727

2828
echo "~~~ Running integration tests as $USER"
2929

30-
go install gotest.tools/gotestsum
31-
gotestsum --version
30+
make install-gotestsum
3231

3332
# Parsing version.go. Will be simplified here: https://github.com/elastic/ingest-dev/issues/4925
3433
#AGENT_VERSION=$(grep "const defaultBeatVersion =" version/version.go | cut -d\" -f2)

.buildkite/scripts/buildkite-k8s-integration-tests.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ chmod +x ./testsBinary
4141

4242
export TEST_DEFINE_PREFIX="${CLUSTER_NAME}"
4343

44-
go install gotest.tools/gotestsum
45-
gotestsum --version
44+
make install-gotestsum
4645

4746
TESTS_EXIT_STATUS=0
4847
for variant in "${docker_variants[@]}"; do

.buildkite/scripts/integration-tests.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ $PSVersionTable.PSVersion
99

1010
. "$PWD\.buildkite\scripts\steps\ess.ps1"
1111

12+
# TODO: make is not available on Windows yet
13+
# hence we cannot use make install-gotestsum
1214
go install gotest.tools/gotestsum
1315
gotestsum --version
1416

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ mage:
1111
@go install github.com/magefile/mage
1212
@-mage -clean
1313

14+
15+
## install-gotestsum : Install gotestsum
16+
.PHONY: install-gotestsum
17+
install-gotestsum:
18+
@echo Installing gotestsum
19+
go install gotest.tools/gotestsum
20+
@-gotestsum --version
21+
1422
## help : Show this help.
1523
help: Makefile
1624
@printf "Usage: make [target] [VARIABLE=value]\nTargets:\n"

dev-tools/mage/gotest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func GoTest(ctx context.Context, params GoTestArgs) error {
229229
// The additional arguments given via GoTestArgs are applied to `go test` only. Callers can not
230230
// modify any of the gotestsum arguments.
231231

232-
gotestsumArgs := []string{"--no-color"}
232+
gotestsumArgs := []string{"--no-color", "--junitfile-hide-skipped-tests"}
233233
if mg.Verbose() {
234234
gotestsumArgs = append(gotestsumArgs, "-f", "standard-verbose")
235235
} else {

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ require (
9494
gopkg.in/ini.v1 v1.67.0
9595
gopkg.in/yaml.v2 v2.4.0
9696
gopkg.in/yaml.v3 v3.0.1
97-
gotest.tools/gotestsum v1.9.0
97+
gotest.tools/gotestsum v1.12.2
9898
helm.sh/helm/v3 v3.17.3
9999
k8s.io/api v0.32.3
100100
k8s.io/apimachinery v0.32.3
@@ -247,6 +247,7 @@ require (
247247
github.com/aws/smithy-go v1.22.3 // indirect
248248
github.com/axiomhq/hyperloglog v0.2.3 // indirect
249249
github.com/beorn7/perks v1.0.1 // indirect
250+
github.com/bitfield/gotestdox v0.2.2 // indirect
250251
github.com/blang/semver/v4 v4.0.0 // indirect
251252
github.com/bmatcuk/doublestar/v4 v4.8.1 // indirect
252253
github.com/cenkalti/backoff/v5 v5.0.2 // indirect

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce
311311
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
312312
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
313313
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
314+
github.com/bitfield/gotestdox v0.2.2 h1:x6RcPAbBbErKLnapz1QeAlf3ospg8efBsedU93CDsnE=
315+
github.com/bitfield/gotestdox v0.2.2/go.mod h1:D+gwtS0urjBrzguAkTM2wodsTQYFHdpx8eqRJ3N+9pY=
314316
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 h1:oMCHnXa6CCCafdPDbMh/lWRhRByN0VFLvv+g+ayx1SI=
315317
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI=
316318
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
@@ -2275,6 +2277,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
22752277
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
22762278
gotest.tools/gotestsum v1.9.0 h1:Jbo/0k/sIOXIJu51IZxEAt27n77xspFEfL6SqKUR72A=
22772279
gotest.tools/gotestsum v1.9.0/go.mod h1:6JHCiN6TEjA7Kaz23q1bH0e2Dc3YJjDUZ0DmctFZf+w=
2280+
gotest.tools/gotestsum v1.12.2 h1:eli4tu9Q2D/ogDsEGSr8XfQfl7mT0JsGOG6DFtUiZ/Q=
2281+
gotest.tools/gotestsum v1.12.2/go.mod h1:kjRtCglPZVsSU0hFHX3M5VWBM6Y63emHuB14ER1/sow=
22782282
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
22792283
gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A=
22802284
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=

0 commit comments

Comments
 (0)