From 6c93c8be563d19f6d9735f96b0139e277030a750 Mon Sep 17 00:00:00 2001 From: Adphi Date: Sat, 10 Sep 2022 12:38:02 +0200 Subject: [PATCH] tests: fix builder tests: pull image before test Signed-off-by: Adphi --- builder_test.go | 1 + os_release.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/builder_test.go b/builder_test.go index 498a658..22db463 100644 --- a/builder_test.go +++ b/builder_test.go @@ -31,6 +31,7 @@ import ( ) func testSysconfig(t *testing.T, ctx context.Context, img, sysconf, kernel, initrd string) { + require.NoError(t, docker.Pull(ctx, img)) tmpPath := filepath.Join(os.TempDir(), "d2vm-tests", strings.NewReplacer(":", "-", ".", "-").Replace(img)) require.NoError(t, os.MkdirAll(tmpPath, 0755)) defer os.RemoveAll(tmpPath) diff --git a/os_release.go b/os_release.go index b82b98a..6fc2792 100644 --- a/os_release.go +++ b/os_release.go @@ -93,7 +93,7 @@ var ( ) func FetchDockerImageOSRelease(ctx context.Context, img string, tmpPath string) (OSRelease, error) { - d := filepath.Join(tmpPath, "osrelase.Dockerfile") + d := filepath.Join(tmpPath, "osrelease.Dockerfile") f, err := os.Create(d) if err != nil { return OSRelease{}, err