From cc19091e91a75cb72dbd127608aaec6b9bcf4170 Mon Sep 17 00:00:00 2001 From: Paul Holzinger <pholzing@redhat.com> Date: Thu, 13 Apr 2023 11:58:59 +0200 Subject: [PATCH] test/e2e: unset CONTAINERS_CONF before Cleanup() If we do not unset CONTAINERS_CONF before tests that create a invlid config will cause the Cleanup to fail. Signed-off-by: Paul Holzinger <pholzing@redhat.com> --- test/e2e/containers_conf_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go index c7e96dfde3..2fa5e83632 100644 --- a/test/e2e/containers_conf_test.go +++ b/test/e2e/containers_conf_test.go @@ -37,11 +37,11 @@ var _ = Describe("Verify podman containers.conf usage", func() { }) AfterEach(func() { + os.Unsetenv("CONTAINERS_CONF") + os.Unsetenv("CONTAINERS_CONF_OVERRIDE") podmanTest.Cleanup() f := CurrentSpecReport() processTestResult(f) - os.Unsetenv("CONTAINERS_CONF") - os.Unsetenv("CONTAINERS_CONF_OVERRIDE") }) It("limits test", func() {