Skip to content

Commit f9a2ff8

Browse files
committed
[infra-tests] Add self-signed integration test
This PR adds a new test option called `self-signed` which is used to enable `self-signed` integration tests. This is done by adding a new `generate-self-signed` make option, which is called whenever `self_signed` env variable is enabled. Once enabled, self-signed certs are genereated and relevant `self-signed-config` is called to attach those files into `kots` config. Signed-off-by: Tarun Pothulapati <[email protected]>
1 parent 124a2e6 commit f9a2ff8

File tree

7 files changed

+165
-63
lines changed

7 files changed

+165
-63
lines changed

.werft/aks-installer-tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ args:
2020
desc: "Set this to true to skip integration tests"
2121
required: false
2222
default: false
23+
- name: selfSigned
24+
desc: "Set this to true to generate and use a private self-signed certificate"
25+
required: false
26+
default: false
2327
- name: upgrade
2428
desc: "Set this to true to run KOTS upgrade from the specified version to the latest version"
2529
required: false

.werft/eks-installer-tests.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ args:
2424
desc: "Set this to true to run KOTS upgrade from the specified version to the latest version"
2525
required: false
2626
default: false
27+
- name: selfSigned
28+
desc: "Set this to true to generate and use a private self-signed certificate"
29+
required: false
30+
default: false
2731
- name: preview
2832
desc: "Setting preview to true creates a self-hosted preview for you to consume"
2933
required: false
@@ -120,6 +124,10 @@ pod:
120124
sudo chown -R gitpod:gitpod /workspace
121125
sudo apt update && apt install gettext-base
122126
127+
# install mkcert
128+
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
129+
chmod +x mkcert-v*-linux-amd64
130+
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
123131
124132
export domain="{{ .Annotations.subdomain }}"
125133

.werft/gke-installer-tests.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ args:
2020
desc: "Set this to true to skip integration tests"
2121
required: false
2222
default: false
23+
- name: selfSigned
24+
desc: "Set this to true to generate and use a private self-signed certificate"
25+
required: false
26+
default: false
2327
- name: upgrade
2428
desc: "Set this to true to run KOTS upgrade from the specified version to the latest version"
2529
required: false
@@ -107,6 +111,11 @@ pod:
107111
sudo chown -R gitpod:gitpod /workspace
108112
sudo apt update && apt install gettext-base
109113
114+
# install mkcert
115+
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
116+
chmod +x mkcert-v*-linux-amd64
117+
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
118+
110119
export domain="{{ .Annotations.subdomain }}"
111120
if [[ "$domain" == "<no value>" ]]; then
112121
export TF_VAR_TEST_ID=$(echo $RANDOM | md5sum | head -c 5; echo)-gcp

0 commit comments

Comments
 (0)