diff --git a/hack/e2e/test.sh b/hack/e2e/test.sh index 8b695c59..e43b1fd3 100755 --- a/hack/e2e/test.sh +++ b/hack/e2e/test.sh @@ -201,8 +201,10 @@ kubectl logs deployments/venafi-kubernetes-agent \ | timeout 60 jq 'if .msg | test("Data sent successfully") then . | halt_error(0) end' set -o pipefail -# Create a unique TLS Secret and wait for it to appear in the Venafi certificate inventory API -commonname="venafi-kubernetes-agent-e2e.$(uuidgen)" +# Create a unique TLS Secret and wait for it to appear in the Venafi certificate +# inventory API. The case conversion is due to macOS' version of uuidgen which +# prints UUIDs in upper case, but DNS labels need lower case characters. +commonname="venafi-kubernetes-agent-e2e.$(uuidgen | tr '[:upper:]' '[:lower:]').example.com" openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/tls.key -out /tmp/tls.crt -subj "/CN=$commonname" 2>/dev/null kubectl create secret tls "$commonname" --cert=/tmp/tls.crt --key=/tmp/tls.key -o yaml --dry-run=client | kubectl apply -f -