fix: adjust acceptance test action
[skip ci]
This commit is contained in:
parent
e54a386119
commit
de2a9e2ea8
1 changed files with 39 additions and 38 deletions
77
.github/actions/acc_test/action.yaml
vendored
77
.github/actions/acc_test/action.yaml
vendored
|
|
@ -210,7 +210,7 @@ runs:
|
|||
TF_ACC_KEK_KEY_RING_ID=${TF_ACC_KEK_KEY_RING_ID} \
|
||||
TF_ACC_KEK_KEY_VERSION=${TF_ACC_KEK_KEY_VERSION} \
|
||||
TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \
|
||||
go test -v ${{ inputs.test_file }} -count=1 -timeout=${{ inputs.test_timeout_string }}
|
||||
go test -v ${{ inputs.test_file }} -timeout=${{ inputs.test_timeout_string }}
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
TF_ACC_PROJECT_ID: ${{ inputs.project_id }}
|
||||
|
|
@ -221,45 +221,11 @@ runs:
|
|||
TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }}
|
||||
TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }}
|
||||
|
||||
- name: Run test action
|
||||
if: ${{ inputs.test_file == '' }}
|
||||
env:
|
||||
TF_ACC: 1
|
||||
TF_ACC_PROJECT_ID: ${{ inputs.project_id }}
|
||||
TF_ACC_REGION: ${{ inputs.region }}
|
||||
TF_ACC_TEST_PROJECT_USER_EMAIL: ${{ inputs.project_user_email }}
|
||||
TF_ACC_KEK_KEY_ID: ${{ inputs.tf_acc_kek_key_id }}
|
||||
TF_ACC_KEK_KEY_RING_ID: ${{ inputs.tf_acc_kek_key_ring_id }}
|
||||
TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }}
|
||||
TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }}
|
||||
TF_ACC_SERVICE_ACCOUNT_FILE: ${{ steps.service_account.outputs.safile }}
|
||||
uses: robherley/go-test-action@v0
|
||||
with:
|
||||
testArguments: "./... -timeout ${{ inputs.test_timeout_string }}"
|
||||
moduleDirectory: "stackit"
|
||||
|
||||
# - name: Run acceptance tests
|
||||
# does not work correctly
|
||||
# - name: Run test action
|
||||
# if: ${{ inputs.test_file == '' }}
|
||||
# shell: bash
|
||||
# run: |
|
||||
# echo "::group::go test all"
|
||||
# set -e
|
||||
# set -o pipefail
|
||||
#
|
||||
# echo "Running acceptance tests for the terraform provider"
|
||||
# cd stackit || exit 1
|
||||
# TF_ACC=1 \
|
||||
# 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="${PWD}/${{ 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} \
|
||||
# TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \
|
||||
# go test -v ./... -count=1 -timeout=${{ inputs.test_timeout_string }}
|
||||
# echo "::endgroup::"
|
||||
# env:
|
||||
# TF_ACC: 1
|
||||
# TF_ACC_PROJECT_ID: ${{ inputs.project_id }}
|
||||
# TF_ACC_REGION: ${{ inputs.region }}
|
||||
# TF_ACC_TEST_PROJECT_USER_EMAIL: ${{ inputs.project_user_email }}
|
||||
|
|
@ -267,3 +233,38 @@ runs:
|
|||
# TF_ACC_KEK_KEY_RING_ID: ${{ inputs.tf_acc_kek_key_ring_id }}
|
||||
# TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }}
|
||||
# TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }}
|
||||
# TF_ACC_SERVICE_ACCOUNT_FILE: ${{ steps.service_account.outputs.safile }}
|
||||
# uses: robherley/go-test-action@v0
|
||||
# with:
|
||||
# testArguments: "./... -timeout ${{ inputs.test_timeout_string }}"
|
||||
# moduleDirectory: "stackit"
|
||||
|
||||
- name: Run acceptance tests
|
||||
if: ${{ inputs.test_file == '' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::group::go test all"
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
echo "Running acceptance tests for the terraform provider"
|
||||
cd stackit || exit 1
|
||||
TF_ACC=1 \
|
||||
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="${PWD}/${{ 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} \
|
||||
TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \
|
||||
go test -v ./... -timeout=${{ inputs.test_timeout_string }}
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
TF_ACC_PROJECT_ID: ${{ inputs.project_id }}
|
||||
TF_ACC_REGION: ${{ inputs.region }}
|
||||
TF_ACC_TEST_PROJECT_USER_EMAIL: ${{ inputs.project_user_email }}
|
||||
TF_ACC_KEK_KEY_ID: ${{ inputs.tf_acc_kek_key_id }}
|
||||
TF_ACC_KEK_KEY_RING_ID: ${{ inputs.tf_acc_kek_key_ring_id }}
|
||||
TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }}
|
||||
TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue