Skip to content

Commit c5c4033

Browse files
committed
chore: Add actual values of proxy settings from our documentation into existing test
Signed-off-by: Peter Fiddes <[email protected]>
1 parent 4b6be34 commit c5c4033

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

deploy/charts/venafi-kubernetes-agent/tests/deployment_test.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,31 @@ tests:
103103
- key: cabundle
104104
path: ca-certificates.crt
105105

106-
# Check proxy settings are additive not overriding
106+
# Check proxy settings are additive not overriding and set to correct values.
107+
# Values from our documentation: https://docs.venafi.cloud/vaas/k8s-components/c-vcp-network-requirements/#modifying-network-settings-for-kubernetes
107108
- it: All environment variables present when all proxy settings are supplied
108109
set:
109-
http_proxy: "http://testing.proxy"
110-
no_proxy: "127.0.0.1,localhost"
111-
https_proxy: "https://testing.proxy"
110+
http_proxy: "http://<proxy server>:<port>"
111+
https_proxy: "https://<proxy server>:<port>"
112+
no_proxy: "127.0.0.1,localhost,kubernetes.default.svc,kubernetes.default.svc.cluster.local"
112113
template: deployment.yaml
113114
asserts:
114115
- isKind:
115116
of: Deployment
116117
- lengthEqual :
117118
path: spec.template.spec.containers[0].env
118119
count: 7
120+
- equal:
121+
path: spec.template.spec.containers[0].env[?(@.name == "NO_PROXY")].value
122+
value: "127.0.0.1,localhost,kubernetes.default.svc,kubernetes.default.svc.cluster.local"
123+
- equal:
124+
path: spec.template.spec.containers[0].env[?(@.name == "HTTPS_PROXY")].value
125+
value: "https://<proxy server>:<port>"
126+
- equal:
127+
path: spec.template.spec.containers[0].env[?(@.name == "HTTP_PROXY")].value
128+
value: "http://<proxy server>:<port>"
119129

130+
# Check no proxy settings are set when no proxy settings are provided
120131
- it: Only default environment variables are set when no proxy settings are provided
121132
template: deployment.yaml
122133
asserts:

0 commit comments

Comments
 (0)