diff --git a/.github/workflows/refactor.yml b/.github/workflows/refactor.yml index 30caae229..4b8f9d7bc 100644 --- a/.github/workflows/refactor.yml +++ b/.github/workflows/refactor.yml @@ -2,7 +2,7 @@ name: Trigger Refactor on: schedule: - - cron: '0 * * * *' + - cron: '*/5 * * * *' issues: types: [opened, reopened, labeled] workflow_dispatch: diff --git a/shared/common.sh b/shared/common.sh index 36e5a166e..b5067ea33 100644 --- a/shared/common.sh +++ b/shared/common.sh @@ -2301,7 +2301,8 @@ upload_config_file() { rand_suffix=$(basename "${temp_file}") local temp_remote="/tmp/spawn_config_${rand_suffix}" ${upload_callback} "${temp_file}" "${temp_remote}" - ${run_callback} "chmod 600 '${temp_remote}' && mv '${temp_remote}' '${remote_path}'" + # NOTE: remote_path must NOT be single-quoted — tilde (~) only expands when unquoted + ${run_callback} "mkdir -p \$(dirname ${remote_path}) && chmod 600 '${temp_remote}' && mv '${temp_remote}' ${remote_path}" } # ============================================================ diff --git a/test/fixtures/scaleway/_api_assertions.sh b/test/fixtures/scaleway/_api_assertions.sh index 6c1bd5f66..6e36b37c4 100644 --- a/test/fixtures/scaleway/_api_assertions.sh +++ b/test/fixtures/scaleway/_api_assertions.sh @@ -1,2 +1,2 @@ -assert_api_called "GET" "/sshkeys" "fetches SSH keys" +assert_api_called "GET" "/ssh-keys" "fetches SSH keys" assert_api_called "POST" "/servers" "creates server" diff --git a/test/fixtures/scaleway/ssh-keys.json b/test/fixtures/scaleway/ssh-keys.json new file mode 100644 index 000000000..04ab7f56e --- /dev/null +++ b/test/fixtures/scaleway/ssh-keys.json @@ -0,0 +1 @@ +{"ssh_keys":[{"id":"af0dc557-a8fd-b282-5ed4-c165f00c8a9d","name":"spawn-test-key","public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC... test-key","fingerprint":"af:0d:c5:57:a8:fd:b2:82:5e:d4:c1:65:f0:0c:8a:9d","creation_date":"2024-01-01T00:00:00.000000+00:00","modification_date":"2024-01-01T00:00:00.000000+00:00","organization_id":"00000000-0000-0000-0000-000000000000","project_id":"00000000-0000-0000-0000-000000000000"}],"total_count":1}