From d50a55233a332809b431d58e46abbe61b26f9d98 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 27 Oct 2022 15:16:19 +0200 Subject: [PATCH] ginkgo testing: fix podman usernamespace join When there is a podman pause process running the local podman ginkgo tests will join the usernamespace. This because pkg/rootless will automatically join the ns on startup when possible. To fix this we need to use the remote build tag which disables that behavior. However since the remote tag is also used in the e2e test itself we would always run remote tests which is wrong, this is fixed by using a new `remote_testing` tag for the test. see discussion here: https://github.com/containers/podman/pull/16309#discussion_r1006166930 Signed-off-by: Paul Holzinger --- Makefile | 4 ++-- test/e2e/libpod_suite_remote_test.go | 4 ++-- test/e2e/libpod_suite_test.go | 4 ++-- test/e2e/play_build_test.go | 4 ++-- test/e2e/run_apparmor_test.go | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 672401d3c2..6c6ef62521 100644 --- a/Makefile +++ b/Makefile @@ -539,7 +539,7 @@ test: localunit localintegration remoteintegration localsystem remotesystem ## .PHONY: ginkgo-run ginkgo-run: ACK_GINKGO_RC=true ginkgo version - ACK_GINKGO_RC=true ginkgo -v $(TESTFLAGS) -tags "$(TAGS)" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor -nodes $(GINKGONODES) -debug $(GINKGOWHAT) $(HACK) + ACK_GINKGO_RC=true ginkgo -v $(TESTFLAGS) -tags "$(TAGS) remote" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor -nodes $(GINKGONODES) -debug $(GINKGOWHAT) $(HACK) .PHONY: ginkgo ginkgo: @@ -547,7 +547,7 @@ ginkgo: .PHONY: ginkgo-remote ginkgo-remote: - $(MAKE) ginkgo-run TAGS="$(REMOTETAGS)" HACK= + $(MAKE) ginkgo-run TAGS="$(REMOTETAGS) remote_testing" HACK= .PHONY: localintegration localintegration: test-binaries ginkgo diff --git a/test/e2e/libpod_suite_remote_test.go b/test/e2e/libpod_suite_remote_test.go index 499373e657..d824d64d8e 100644 --- a/test/e2e/libpod_suite_remote_test.go +++ b/test/e2e/libpod_suite_remote_test.go @@ -1,5 +1,5 @@ -//go:build remote -// +build remote +//go:build remote_testing +// +build remote_testing package integration diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index b797fbb894..a267ab263f 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -1,5 +1,5 @@ -//go:build !remote -// +build !remote +//go:build !remote_testing +// +build !remote_testing package integration diff --git a/test/e2e/play_build_test.go b/test/e2e/play_build_test.go index 914144ae63..83ce98d677 100644 --- a/test/e2e/play_build_test.go +++ b/test/e2e/play_build_test.go @@ -1,5 +1,5 @@ -//go:build !remote -// +build !remote +//go:build !remote_testing +// +build !remote_testing // build for play kube is not supported on remote yet. diff --git a/test/e2e/run_apparmor_test.go b/test/e2e/run_apparmor_test.go index f486054c38..71f5e47d0e 100644 --- a/test/e2e/run_apparmor_test.go +++ b/test/e2e/run_apparmor_test.go @@ -1,5 +1,5 @@ -//go:build !remote -// +build !remote +//go:build !remote_testing +// +build !remote_testing package integration