Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions test/e2e/app_multiple_sources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestMultiSourceAppWithHelmExternalValueFiles(t *testing.T) {
RepoURL: RepoURL(RepoURLTypeFile),
Ref: "values",
}, {
RepoURL: "https://github.com/argoproj/argocd-example-apps.git",
RepoURL: RepoURL(RepoURLTypeFile),
TargetRevision: "HEAD",
Path: "helm-guestbook",
Helm: &ApplicationSourceHelm{
Expand Down Expand Up @@ -107,9 +107,13 @@ func TestMultiSourceAppWithHelmExternalValueFiles(t *testing.T) {
for _, r := range app.Status.Resources {
statusByName[r.Name] = r.Status
}
// check if the app has 3 resources, guestbook and 2 pods
assert.Len(t, statusByName, 1)
assert.Equal(t, SyncStatusCodeSynced, statusByName["helm-guestbook"])
assert.Equal(t, SyncStatusCodeSynced, statusByName["guestbook-ui"])

// Confirm that the deployment has 3 replicas.
output, err := Run("", "kubectl", "get", "deployment", "guestbook-ui", "-n", DeploymentNamespace(), "-o", "jsonpath={.spec.replicas}")
require.NoError(t, err)
assert.Equal(t, "3", output, "Expected 3 replicas for the helm-guestbook deployment")
})
}

Expand Down
3 changes: 3 additions & 0 deletions test/e2e/testdata/helm-guestbook/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: v2
version: 1.0.0
name: helm-guestbook
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: guestbook-ui
labels:
test: "true"
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: 3
selector:
matchLabels:
app: guestbook-ui
template:
metadata:
labels:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
imagePullPolicy: IfNotPresent
name: guestbook-ui
ports:
- containerPort: 80
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: guestbook-ui
spec:
ports:
- port: 80
targetPort: 80
selector:
app: guestbook-ui
1 change: 1 addition & 0 deletions test/e2e/testdata/helm-guestbook/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
replicas: 1
Loading