From 65d42ed21d2e04f2835eee3acfd0af66b224055f Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Tue, 12 Jul 2022 16:14:22 +0200 Subject: [PATCH] test: added assertion for local-mode config --- .../integ/src/plugins/kubernetes/container/deployment.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/test/integ/src/plugins/kubernetes/container/deployment.ts b/core/test/integ/src/plugins/kubernetes/container/deployment.ts index 5f472e4b28..db8604e1d9 100644 --- a/core/test/integ/src/plugins/kubernetes/container/deployment.ts +++ b/core/test/integ/src/plugins/kubernetes/container/deployment.ts @@ -31,6 +31,7 @@ import { apply } from "../../../../../../src/plugins/kubernetes/kubectl" import { getAppNamespace } from "../../../../../../src/plugins/kubernetes/namespace" import { gardenAnnotationKey } from "../../../../../../src/util/string" import { + k8sReverseProxyImageName, k8sSyncUtilImageName, PROXY_CONTAINER_SSH_TUNNEL_PORT, PROXY_CONTAINER_SSH_TUNNEL_PORT_NAME, @@ -79,6 +80,11 @@ describe("kubernetes container deployment handlers", () => { expect(appContainerSpec!.args).to.eql([]) } + function expectProxyContainerImage(workload: KubernetesWorkload) { + const appContainerSpec = workload.spec.template?.spec?.containers.find((c) => c.name === "local-mode") + expect(appContainerSpec!.image).to.eql(k8sReverseProxyImageName) + } + function expectContainerEnvVars(workload: KubernetesWorkload) { const appContainerSpec = workload.spec.template?.spec?.containers.find((c) => c.name === "local-mode") const env = appContainerSpec!.env! @@ -193,7 +199,7 @@ describe("kubernetes container deployment handlers", () => { expectSshContainerPort(workload) }) - it("Workflow should have empty container args when in local mode", async () => { + it("Workflow should have proxy container image and empty container args when in local mode", async () => { const service = graph.getService("local-mode") const { workload } = await createContainerManifests({ @@ -208,6 +214,7 @@ describe("kubernetes container deployment handlers", () => { blueGreen: false, }) + expectProxyContainerImage(workload) expectEmptyContainerArgs(workload) })