fix: tf acc test pipeline
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 5s
CI Workflow / Prepare GO cache (pull_request) Has been cancelled
CI Workflow / Test readiness for publishing provider (pull_request) Has been cancelled
CI Workflow / CI run tests (pull_request) Has been cancelled
CI Workflow / CI run build and linting (pull_request) Has been cancelled
CI Workflow / Code coverage report (pull_request) Has been cancelled

This commit is contained in:
Marcel S. Henselin 2026-03-10 15:05:23 +01:00
parent 1f4ecb11e8
commit 98b62e4c80

View file

@ -43,7 +43,7 @@ inputs:
service_account_json_file_path:
description: "STACKIT service account JSON file contents"
required: true
default: './service_account.json'
default: 'service_account.json'
test_file:
description: "testfile to run"
@ -132,14 +132,14 @@ runs:
set -e
if [ ! -f "${{ inputs.service_account_json_file_path }}" ]; then
echo "unable to find service account file '${{ inputs.service_account_json_file_path }}'"
if [ -z "${{ inputs.service_account_json_content }}" ]; then
if [[ "${{ inputs.service_account_json_content }}" == "" ]]; then
echo "ERROR: service_account_json_file_content MUST NOT be empty if account file is missing"
exit 1
fi
echo "creating service account file '${{ inputs.service_account_json_file_path }}'"
echo "${{ inputs.service_account_json_content }}" > "${{ inputs.service_account_json_file_path }}"
echo "${{ inputs.service_account_json_content }}" > stackit/"${{ inputs.service_account_json_file_path }}"
fi
ls -l "${{ inputs.service_account_json_file_path }}"
ls -l stackit/"${{ inputs.service_account_json_file_path }}"
- name: Run acceptance test file
if: ${{ inputs.test_file != '' }}
@ -154,7 +154,7 @@ runs:
TF_ACC_PROJECT_ID=${TF_ACC_PROJECT_ID} \
TF_ACC_REGION=${TF_ACC_REGION} \
TF_ACC_TEST_PROJECT_USER_EMAIL=${TF_ACC_TEST_PROJECT_USER_EMAIL} \
TF_ACC_SERVICE_ACCOUNT_FILE=../"${{ inputs.service_account_json_file_path }}" \
TF_ACC_SERVICE_ACCOUNT_FILE="${{ inputs.service_account_json_file_path }}" \
TF_ACC_KEK_KEY_ID=${TF_ACC_KEK_KEY_ID} \
TF_ACC_KEK_KEY_RING_ID=${TF_ACC_KEK_KEY_RING_ID} \
TF_ACC_KEK_KEY_VERSION=${TF_ACC_KEK_KEY_VERSION} \
@ -182,7 +182,7 @@ runs:
TF_ACC_PROJECT_ID=${TF_ACC_PROJECT_ID} \
TF_ACC_REGION=${TF_ACC_REGION} \
TF_ACC_TEST_PROJECT_USER_EMAIL=${TF_ACC_TEST_PROJECT_USER_EMAIL} \
TF_ACC_SERVICE_ACCOUNT_FILE=../"${{ inputs.service_account_json_file_path }}" \
TF_ACC_SERVICE_ACCOUNT_FILE="${{ inputs.service_account_json_file_path }}" \
TF_ACC_KEK_KEY_ID=${TF_ACC_KEK_KEY_ID} \
TF_ACC_KEK_KEY_RING_ID=${TF_ACC_KEK_KEY_RING_ID} \
TF_ACC_KEK_KEY_VERSION=${TF_ACC_KEK_KEY_VERSION} \