From 0060cd6ee4990c6760c55f87a144d56e35dc4f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nils=20m=C3=A5s=C3=A9n?= Date: Tue, 2 Nov 2021 16:53:56 +0100 Subject: [PATCH] test: fully reset ghttp server (#1121) --- pkg/container/client_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/container/client_test.go b/pkg/container/client_test.go index d9bf86f..2f0157d 100644 --- a/pkg/container/client_test.go +++ b/pkg/container/client_test.go @@ -22,14 +22,14 @@ import ( var _ = Describe("the client", func() { var docker *cli.Client var mockServer *ghttp.Server - BeforeSuite(func() { + BeforeEach(func() { mockServer = ghttp.NewServer() docker, _ = cli.NewClientWithOpts( cli.WithHost(mockServer.URL()), cli.WithHTTPClient(mockServer.HTTPTestServer.Client())) }) AfterEach(func() { - mockServer.Reset() + mockServer.Close() }) Describe("WarnOnHeadPullFailed", func() { containerUnknown := *mockContainerWithImageName("unknown.repo/prefix/imagename:latest")