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.
This commit is contained in:
Michael Vogt 2025-01-09 17:25:55 +01:00 committed by Ondřej Budai
parent d35c95a9bc
commit fb56109048

View file

@ -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()