mirror of
https://github.com/linka-cloud/d2vm.git
synced 2024-11-26 01:26:25 +00:00
tests: fix builder tests: pull image before test
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
parent
d7f2c453a9
commit
6c93c8be56
@ -31,6 +31,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func testSysconfig(t *testing.T, ctx context.Context, img, sysconf, kernel, initrd string) {
|
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))
|
tmpPath := filepath.Join(os.TempDir(), "d2vm-tests", strings.NewReplacer(":", "-", ".", "-").Replace(img))
|
||||||
require.NoError(t, os.MkdirAll(tmpPath, 0755))
|
require.NoError(t, os.MkdirAll(tmpPath, 0755))
|
||||||
defer os.RemoveAll(tmpPath)
|
defer os.RemoveAll(tmpPath)
|
||||||
|
@ -93,7 +93,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func FetchDockerImageOSRelease(ctx context.Context, img string, tmpPath string) (OSRelease, error) {
|
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)
|
f, err := os.Create(d)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return OSRelease{}, err
|
return OSRelease{}, err
|
||||||
|
Loading…
Reference in New Issue
Block a user