From a42eb28f3914901e00e72a80c1d25c864cc72567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nils=20m=C3=A5s=C3=A9n?= Date: Sat, 6 Jan 2024 14:39:55 +0100 Subject: [PATCH] fix broken tests --- pkg/container/client_test.go | 2 +- pkg/container/container_test.go | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/container/client_test.go b/pkg/container/client_test.go index 2fea103..687c1a0 100644 --- a/pkg/container/client_test.go +++ b/pkg/container/client_test.go @@ -308,7 +308,7 @@ var _ = Describe("the client", func() { ), ) - err := client.ExecuteCommand(containerID, cmd, 1) + err := client.ExecuteCommand(containerID, cmd, time.Minute) Expect(err).NotTo(HaveOccurred()) // Note: Since Execute requires opening up a raw TCP stream to the daemon for the output, this will fail // when using the mock API server. Regardless of the outcome, the log should include the container ID diff --git a/pkg/container/container_test.go b/pkg/container/container_test.go index a129afe..ce6e960 100644 --- a/pkg/container/container_test.go +++ b/pkg/container/container_test.go @@ -6,6 +6,7 @@ import ( "github.com/docker/go-connections/nat" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "time" ) var _ = Describe("the container", func() { @@ -380,10 +381,10 @@ var _ = Describe("the container", func() { "com.centurylinklabs.watchtower.lifecycle.pre-update-timeout": "3", "com.centurylinklabs.watchtower.lifecycle.post-update-timeout": "5", })) - preTimeout := c.PreUpdateTimeout() - Expect(preTimeout).To(Equal(3)) - postTimeout := c.PostUpdateTimeout() - Expect(postTimeout).To(Equal(5)) + preTimeout := c.GetLifecycleTimeout(types.PreUpdate) + Expect(preTimeout).To(Equal(3 * time.Minute)) + postTimeout := c.GetLifecycleTimeout(types.PostUpdate) + Expect(postTimeout).To(Equal(5 * time.Minute)) }) })