fix test that modifies the wrong cache data

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
pull/8544/head
Matt Butcher 4 years ago
parent 2a69fb7566
commit 131510aa94
No known key found for this signature in database
GPG Key ID: DCD5F5E5EF32C345

@ -40,11 +40,12 @@ func TestRepoAddCmd(t *testing.T) {
} }
defer srv.Stop() defer srv.Stop()
repoFile := filepath.Join(ensure.TempDir(t), "repositories.yaml") tmpdir := ensure.TempDir(t)
repoFile := filepath.Join(tmpdir, "repositories.yaml")
tests := []cmdTestCase{{ tests := []cmdTestCase{{
name: "add a repository", name: "add a repository",
cmd: fmt.Sprintf("repo add test-name %s --repository-config %s", srv.URL(), repoFile), cmd: fmt.Sprintf("repo add test-name %s --repository-config %s --repository-cache %s", srv.URL(), repoFile, tmpdir),
golden: "output/repo-add.txt", golden: "output/repo-add.txt",
}} }}

Loading…
Cancel
Save