File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -122,22 +122,29 @@ echo "Running additional tests..."
122122
123123# Set up some variables
124124CONTENT_TYPE=" Content-Type: application/json"
125- TF_VAR_coral_uri=http://$SITE :$PORT
125+ export TF_VAR_coral_uri=http://$SITE :$PORT
126126
127127# Get a token
128128echo " Getting an auth token:"
129- TF_VAR_auth_token=$( curl -s -X POST -H " $CONTENT_TYPE " -d \
129+ export TF_VAR_auth_token=$( curl -s -X POST -H " $CONTENT_TYPE " -d \
130130 " {
131131 \" username\" : \" admin\" ,
132132 \" password\" : \" $TEST_PASSWORD \"
133133 }" \
134134 ${TF_VAR_coral_uri} /api-token-auth/ | jq -r ' .token' )
135135echo " Auth Token: $TF_VAR_auth_token "
136136
137- python -m venv venv
138- source venv/bin/active
137+ # Install OpenTofu
138+ curl --proto ' =https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o install-opentofu.sh
139+ chmod +x install-opentofu.sh
140+ ./install-opentofu.sh --install-method deb
141+ rm -f install-opentofu.sh
142+
143+ # Install python dependencies
139144pip install -r ${SCRIPT_DIR} /../../requirements.txt
145+ pip install -r ${SCRIPT_DIR} /../../test-requirements.txt
140146
147+ # Run tests
141148pytest ${SCRIPT_DIR} /tofu_tests.py
142149
143150# Scrape prometheus metrics:
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ RESPONSE=$(curl -s -w "%{http_code}" -X POST -H "$AUTH_HEADER" -H "$CONTENT_TYPE
230230 }
231231 }
232232 }" \
233- http://$SITE :$PORT /consumer/create/ )
233+ http://$SITE :$PORT /consumer/create)
234234
235235if [ " $RESPONSE " -eq 204 ]; then
236236 echo " All tests completed."
You can’t perform that action at this time.
0 commit comments