From 438e41b3a661a61c9eeb91e4297e0b123d59f87a Mon Sep 17 00:00:00 2001 From: Maxime BOSSARD Date: Tue, 5 Dec 2023 17:15:32 +0100 Subject: [PATCH] Use test framework to log --- integration/integration_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/integration/integration_test.go b/integration/integration_test.go index c493dbd205..157df981b0 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -651,19 +651,20 @@ func TestWarmerTwice(t *testing.T) { WarmerImage, "--cache-dir=/cache", "-i", "debian:trixie-slim") + warmCmd := exec.Command("docker", dockerRunFlags...) - out, err := RunCommandWithoutTest(warmCmd) if err != nil { - log.Fatal("Unable to perform first warming: ", err) + t.Fatalf("Unable to perform first warming: %s", err) } - log.Printf("First warm output: %s", out) + t.Logf("First warm output: %s", out) + warmCmd = exec.Command("docker", dockerRunFlags...) out, err = RunCommandWithoutTest(warmCmd) if err != nil { - log.Fatal("Unable to perform second warming: ", err) + t.Fatalf("Unable to perform second warming: %s", err) } - log.Printf("Second warm output: %s", out) + t.Logf("Second warm output: %s", out) } func verifyBuildWith(t *testing.T, cache, dockerfile string) {