Merge "Isolate document pull unit test"

This commit is contained in:
Zuul 2020-05-21 03:23:56 +00:00 committed by Gerrit Code Review
commit d6ddb502c3

View File

@ -83,8 +83,8 @@ func TestPull(t *testing.T) {
currentManifest, err := dummyPullSettings.Config.CurrentContextManifest() currentManifest, err := dummyPullSettings.Config.CurrentContextManifest()
require.NoError(err) require.NoError(err)
testGitURL := fixtures.Basic().One().URL testGitDir := fixtures.Basic().One().DotGit().Root()
dirNameFromURL := util.GitDirNameFromURL(testGitURL) dirNameFromURL := util.GitDirNameFromURL(testGitDir)
globalTmpDir, cleanup := testutil.TempDir(t, "airshipctlCloneTest-") globalTmpDir, cleanup := testutil.TempDir(t, "airshipctlCloneTest-")
defer cleanup(t) defer cleanup(t)
@ -95,7 +95,7 @@ func TestPull(t *testing.T) {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
currentManifest.Repositories = map[string]*config.Repository{ currentManifest.Repositories = map[string]*config.Repository{
currentManifest.PrimaryRepositoryName: { currentManifest.PrimaryRepositoryName: {
URLString: testGitURL, URLString: testGitDir,
CheckoutOptions: chkOutOpts, CheckoutOptions: chkOutOpts,
Auth: &config.RepoAuth{ Auth: &config.RepoAuth{
Type: "http-basic", Type: "http-basic",