fix: tf acc test pipeline
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Has been cancelled
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
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Has been cancelled
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:
parent
80a69e264f
commit
731957fcd0
2 changed files with 16 additions and 14 deletions
16
.github/actions/acc_test/action.yaml
vendored
16
.github/actions/acc_test/action.yaml
vendored
|
|
@ -130,15 +130,15 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
if [ ! -f "${{ inputs.service_account_json_file_path }}" ]; then
|
if [ ! -f "${{ inputs.service_account_json_file_path }}" ]; then
|
||||||
echo "unable to find service account file '${{ inputs.service_account_json_file_path }}'"
|
echo "unable to find service account file '${{ inputs.service_account_json_file_path }}'"
|
||||||
if [ "x${{ inputs.service_account_json_content }}" == "x" ]; then
|
if [ "x${{ inputs.service_account_json_content }}" == "x" ]; then
|
||||||
echo "ERROR: service_account_json_file_content MUST NOT be empty if account file is missing"
|
echo "ERROR: service_account_json_file_content MUST NOT be empty if account file is missing"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
|
||||||
echo "creating service account file '${{ inputs.service_account_json_file_path }}'"
|
|
||||||
echo "${{ inputs.service_account_json_content }}" > stackit/"${{ inputs.service_account_json_file_path }}"
|
|
||||||
fi
|
fi
|
||||||
|
echo "creating service account file '${{ inputs.service_account_json_file_path }}'"
|
||||||
|
echo "${{ inputs.service_account_json_content }}" > stackit/"${{ inputs.service_account_json_file_path }}"
|
||||||
|
fi
|
||||||
ls -l stackit/"${{ inputs.service_account_json_file_path }}"
|
ls -l stackit/"${{ inputs.service_account_json_file_path }}"
|
||||||
|
|
||||||
- name: Run acceptance test file
|
- name: Run acceptance test file
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import (
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -160,11 +159,14 @@ func readTestServiceAccountJsonFromFile(path string) (string, error) {
|
||||||
customPath, ok := os.LookupEnv("TF_ACC_SERVICE_ACCOUNT_FILE")
|
customPath, ok := os.LookupEnv("TF_ACC_SERVICE_ACCOUNT_FILE")
|
||||||
if !ok || customPath == "" {
|
if !ok || customPath == "" {
|
||||||
path = serviceAccountFilePath
|
path = serviceAccountFilePath
|
||||||
home, err := os.UserHomeDir()
|
// TODO: check if we want to handle this with a home dir
|
||||||
if err != nil {
|
/*
|
||||||
return "", fmt.Errorf("getting home directory: %w", err)
|
home, err := os.UserHomeDir()
|
||||||
}
|
if err != nil {
|
||||||
path = filepath.Join(home, path)
|
return "", fmt.Errorf("getting home directory: %w", err)
|
||||||
|
}
|
||||||
|
path = filepath.Join(home, path)
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
path = customPath
|
path = customPath
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue