diff --git a/test/e2e/app_multiple_sources_test.go b/test/e2e/app_multiple_sources_test.go index 30c8e6bdce1ef..75d82e25a7ad3 100644 --- a/test/e2e/app_multiple_sources_test.go +++ b/test/e2e/app_multiple_sources_test.go @@ -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{ @@ -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") }) } diff --git a/test/e2e/testdata/helm-guestbook/Chart.yaml b/test/e2e/testdata/helm-guestbook/Chart.yaml new file mode 100644 index 0000000000000..a0bf1331f4bff --- /dev/null +++ b/test/e2e/testdata/helm-guestbook/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +version: 1.0.0 +name: helm-guestbook diff --git a/test/e2e/testdata/helm-guestbook/templates/guestbook-ui-deployment.yaml b/test/e2e/testdata/helm-guestbook/templates/guestbook-ui-deployment.yaml new file mode 100644 index 0000000000000..b7c3a654e2965 --- /dev/null +++ b/test/e2e/testdata/helm-guestbook/templates/guestbook-ui-deployment.yaml @@ -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 diff --git a/test/e2e/testdata/helm-guestbook/templates/guestbook-ui-svc.yaml b/test/e2e/testdata/helm-guestbook/templates/guestbook-ui-svc.yaml new file mode 100644 index 0000000000000..e8a4a27fbae40 --- /dev/null +++ b/test/e2e/testdata/helm-guestbook/templates/guestbook-ui-svc.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: guestbook-ui +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: guestbook-ui diff --git a/test/e2e/testdata/helm-guestbook/values.yaml b/test/e2e/testdata/helm-guestbook/values.yaml new file mode 100644 index 0000000000000..3b3a9950e87cd --- /dev/null +++ b/test/e2e/testdata/helm-guestbook/values.yaml @@ -0,0 +1 @@ +replicas: 1