mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: crenshaw-dev <350466+crenshaw-dev@users.noreply.github.com>
64 lines
1.6 KiB
Go
64 lines
1.6 KiB
Go
package e2e
|
|
|
|
import (
|
|
"testing"
|
|
|
|
corev1 "k8s.io/api/core/v1"
|
|
|
|
. "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
|
|
"github.com/argoproj/argo-cd/v3/test/e2e/fixture"
|
|
. "github.com/argoproj/argo-cd/v3/test/e2e/fixture/app"
|
|
)
|
|
|
|
func TestGitSubmoduleSSHSupport(t *testing.T) {
|
|
Given(t).
|
|
RepoURLType(fixture.RepoURLTypeSSHSubmoduleParent).
|
|
Path("submodule").
|
|
Recurse().
|
|
CustomSSHKnownHostsAdded().
|
|
SubmoduleSSHRepoURLAdded(true).
|
|
When().
|
|
CreateFromFile(func(_ *Application) {}).
|
|
Sync().
|
|
Then().
|
|
Expect(SyncStatusIs(SyncStatusCodeSynced)).
|
|
Expect(Pod(func(p corev1.Pod) bool { return p.Name == "pod-in-submodule" }))
|
|
}
|
|
|
|
func TestGitSubmoduleHTTPSSupport(t *testing.T) {
|
|
Given(t).
|
|
RepoURLType(fixture.RepoURLTypeHTTPSSubmoduleParent).
|
|
Path("submodule").
|
|
Recurse().
|
|
CustomCACertAdded().
|
|
SubmoduleHTTPSRepoURLAdded(true).
|
|
When().
|
|
CreateFromFile(func(_ *Application) {}).
|
|
Sync().
|
|
Then().
|
|
Expect(SyncStatusIs(SyncStatusCodeSynced)).
|
|
Expect(Pod(func(p corev1.Pod) bool { return p.Name == "pod-in-submodule" }))
|
|
}
|
|
|
|
func TestGitSubmoduleRemovalSupport(t *testing.T) {
|
|
Given(t).
|
|
RepoURLType(fixture.RepoURLTypeSSHSubmoduleParent).
|
|
Path("submodule").
|
|
Recurse().
|
|
CustomSSHKnownHostsAdded().
|
|
SubmoduleSSHRepoURLAdded(true).
|
|
When().
|
|
CreateFromFile(func(_ *Application) {}).
|
|
Sync().
|
|
Then().
|
|
Expect(SyncStatusIs(SyncStatusCodeSynced)).
|
|
Expect(Pod(func(p corev1.Pod) bool { return p.Name == "pod-in-submodule" })).
|
|
When().
|
|
RemoveSubmodule().
|
|
Refresh(RefreshTypeNormal).
|
|
Sync().
|
|
Then().
|
|
Expect(SyncStatusIs(SyncStatusCodeSynced)).
|
|
Expect(NotPod(func(p corev1.Pod) bool { return p.Name == "pod-in-submodule" }))
|
|
}
|