From 22b76d0d0f67fc22df41a424c0fc0539119320bd Mon Sep 17 00:00:00 2001 From: SimoneDutto Date: Mon, 16 Dec 2024 17:18:23 +0100 Subject: [PATCH] fix(failure using ipv6 in tests): fix controller addresses resolution in makefile to enable ipv6 The previuos shell command to extract the ipv6 from the show-controller was removing the '[' from the ipv6. The new command removed only the surrounding '[', making it possible to work with ipv6 fix #582 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec62cbd3..a9290d6f 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ endif JUJU=juju CONTROLLER=$(shell ${JUJU} whoami | yq .Controller) -CONTROLLER_ADDRESSES="$(shell ${JUJU} show-controller | yq '.${CONTROLLER}.details."api-endpoints"' | tr -d "[]' "|tr -d '"'|tr -d '\n')" +CONTROLLER_ADDRESSES="$(shell juju show-controller | yq .${CONTROLLER}.details.api-endpoints | yq -r '. | join(",")')" USERNAME="$(shell cat ~/.local/share/juju/accounts.yaml | yq '.controllers.${CONTROLLER}.user'|tr -d '"')" PASSWORD="$(shell cat ~/.local/share/juju/accounts.yaml | yq '.controllers.${CONTROLLER}.password'|tr -d '"')" CA_CERT="$(shell ${JUJU} show-controller $(echo ${CONTROLLER}|tr -d '"')| yq '.${CONTROLLER}.details."ca-cert"'|tr -d '"'|sed 's/\\n/\n/g')"