Skip to content

Commit 4545a5e

Browse files
wallrjmaelvls
andauthored
Update hack/e2e/test.sh
Co-authored-by: Maël Valais <[email protected]>
1 parent 7e0b8d0 commit 4545a5e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hack/e2e/test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,10 @@ kubectl logs deployments/venafi-kubernetes-agent \
201201
| timeout 60 jq 'if .msg | test("Data sent successfully") then . | halt_error(0) end'
202202
set -o pipefail
203203

204-
# Create a unique TLS Secret and wait for it to appear in the Venafi certificate inventory API
205-
commonname="venafi-kubernetes-agent-e2e.$(uuidgen)"
204+
# Create a unique TLS Secret and wait for it to appear in the Venafi certificate
205+
# inventory API. The case conversion is due to macOS' version of uuidgen which
206+
# prints UUIDs in upper case, but DNS labels need lower case characters.
207+
commonname="venafi-kubernetes-agent-e2e.$(uuidgen | tr '[:upper:]' '[:lower:]').example.com"
206208
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/tls.key -out /tmp/tls.crt -subj "/CN=$commonname" 2>/dev/null
207209
kubectl create secret tls "$commonname" --cert=/tmp/tls.crt --key=/tmp/tls.key -o yaml --dry-run=client | kubectl apply -f -
208210

0 commit comments

Comments
 (0)