Merge pull request #8544 from technosophos/fix/repo-add-test-use-cache

fix test that modifies the wrong cache data
pull/8426/head
Martin Hickey 4 years ago committed by GitHub
commit 579c01fad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -40,11 +40,12 @@ func TestRepoAddCmd(t *testing.T) {
}
defer srv.Stop()
repoFile := filepath.Join(ensure.TempDir(t), "repositories.yaml")
tmpdir := ensure.TempDir(t)
repoFile := filepath.Join(tmpdir, "repositories.yaml")
tests := []cmdTestCase{{
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",
}}

Loading…
Cancel
Save