github.com/argoproj/argo-cd@v1.8.7/test/e2e/git_submodule_test.go (about) 1 package e2e 2 3 import ( 4 "testing" 5 6 v1 "k8s.io/api/core/v1" 7 8 "github.com/argoproj/argo-cd/test/e2e/fixture" 9 10 . "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" 11 . "github.com/argoproj/argo-cd/test/e2e/fixture/app" 12 ) 13 14 func TestGitSubmoduleSSHSupport(t *testing.T) { 15 Given(t). 16 RepoURLType(fixture.RepoURLTypeSSHSubmoduleParent). 17 Path("submodule"). 18 Recurse(). 19 CustomSSHKnownHostsAdded(). 20 SubmoduleSSHRepoURLAdded(true). 21 When(). 22 CreateFromFile(func(app *Application) {}). 23 Sync(). 24 Then(). 25 Expect(SyncStatusIs(SyncStatusCodeSynced)). 26 Expect(Pod(func(p v1.Pod) bool { return p.Name == "pod-in-submodule" })) 27 } 28 29 func TestGitSubmoduleHTTPSSupport(t *testing.T) { 30 Given(t). 31 RepoURLType(fixture.RepoURLTypeHTTPSSubmoduleParent). 32 Path("submodule"). 33 Recurse(). 34 CustomCACertAdded(). 35 SubmoduleHTTPSRepoURLAdded(true). 36 When(). 37 CreateFromFile(func(app *Application) {}). 38 Sync(). 39 Then(). 40 Expect(SyncStatusIs(SyncStatusCodeSynced)). 41 Expect(Pod(func(p v1.Pod) bool { return p.Name == "pod-in-submodule" })) 42 }