Skip to content

Commit

Permalink
[infra-tests] Add self-signed integration test
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Pothulapati committed Sep 20, 2022
1 parent 124a2e6 commit 207426e
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 65 deletions.
4 changes: 4 additions & 0 deletions .werft/aks-installer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ args:
desc: "Set this to true to skip integration tests"
required: false
default: false
- name: selfSigned
desc: "Set this to true to generate and use a private self-signed certificate"
required: false
default: false
- name: upgrade
desc: "Set this to true to run KOTS upgrade from the specified version to the latest version"
required: false
Expand Down
8 changes: 8 additions & 0 deletions .werft/eks-installer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ args:
desc: "Set this to true to run KOTS upgrade from the specified version to the latest version"
required: false
default: false
- name: selfSigned
desc: "Set this to true to generate and use a private self-signed certificate"
required: false
default: false
- name: preview
desc: "Setting preview to true creates a self-hosted preview for you to consume"
required: false
Expand Down Expand Up @@ -120,6 +124,10 @@ pod:
sudo chown -R gitpod:gitpod /workspace
sudo apt update && apt install gettext-base
# install mkcert
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
export domain="{{ .Annotations.subdomain }}"
Expand Down
9 changes: 9 additions & 0 deletions .werft/gke-installer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ args:
desc: "Set this to true to skip integration tests"
required: false
default: false
- name: selfSigned
desc: "Set this to true to generate and use a private self-signed certificate"
required: false
default: false
- name: upgrade
desc: "Set this to true to run KOTS upgrade from the specified version to the latest version"
required: false
Expand Down Expand Up @@ -107,6 +111,11 @@ pod:
sudo chown -R gitpod:gitpod /workspace
sudo apt update && apt install gettext-base
# install mkcert
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
export domain="{{ .Annotations.subdomain }}"
if [[ "$domain" == "<no value>" ]]; then
export TF_VAR_TEST_ID=$(echo $RANDOM | md5sum | head -c 5; echo)-gcp
Expand Down
Loading

0 comments on commit 207426e

Please sign in to comment.