From fb56109048ab62e93ee444d60fae07105dc6d4f2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 9 Jan 2025 17:25:55 +0100 Subject: [PATCH] cmd: drop TestListImagesOverrideDatadir With the new build-in repos this test is no longer relevant. We need to look into a different way to test overrides but just providing an empty datadir will no longer work so drop that. --- cmd/image-builder/main_test.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/cmd/image-builder/main_test.go b/cmd/image-builder/main_test.go index fcc8bad..ec745c3 100644 --- a/cmd/image-builder/main_test.go +++ b/cmd/image-builder/main_test.go @@ -102,18 +102,6 @@ func TestBadCmdErrorsNoExtraCobraNoise(t *testing.T) { assert.Equal(t, "", fakeStderr.String()) } -func TestListImagesOverrideDatadir(t *testing.T) { - restore := main.MockOsArgs([]string{"--datadir=/this/path/does/not/exist", "list-images"}) - defer restore() - - var fakeStdout bytes.Buffer - restore = main.MockOsStdout(&fakeStdout) - defer restore() - - err := main.Run() - assert.EqualError(t, err, `no repositories found in the given paths: [/this/path/does/not/exist]`) -} - func TestListImagesErrorsOnExtraArgs(t *testing.T) { restore := main.MockNewRepoRegistry(testrepos.New) defer restore()