From 062fed2af81c3b2d6912ce522bbebbd6832bf476 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Fri, 12 Apr 2024 15:34:47 +0700 Subject: [PATCH] test: improved cleanup --- integration_test/integration_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration_test/integration_test.go b/integration_test/integration_test.go index 143d610..d04d7af 100644 --- a/integration_test/integration_test.go +++ b/integration_test/integration_test.go @@ -70,13 +70,13 @@ func (s *MySuite) TestInterchaintestScaffold() { err = os.Chdir("e2e/interchaintestv8") s.Require().NoError(err) - defer func() { + s.T().Cleanup(func() { err = os.Chdir("../..") s.Require().NoError(err) _, err := exec.Command("rm", "-rf", "e2e").Output() s.Require().NoError(err) - }() + }) _, err = exec.Command("golangci-lint", "run").Output() s.Require().NoError(err)