From 5088812250d655ed3887d3d18e216ee8b38e3c19 Mon Sep 17 00:00:00 2001 From: chadcarlson Date: Sat, 28 Oct 2023 07:51:04 -0400 Subject: [PATCH] Reorg --- .github/workflows/project.yaml | 13 ++++++------- utils/tests/ssh-certs.sh | 4 ++++ 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 utils/tests/ssh-certs.sh diff --git a/.github/workflows/project.yaml b/.github/workflows/project.yaml index 275af5e9..62297dc2 100644 --- a/.github/workflows/project.yaml +++ b/.github/workflows/project.yaml @@ -51,6 +51,12 @@ jobs: ################################################################################################ # B. Setup authenticated Upsun CLI user. + - name: "[setup_cli_auth] 2. Test: an authenticated CLI can retrieve organization info." + run: | + echo "::notice::Verifying CLI is authenticated correctly." + RESULT=$(upsun org:info -o $ORG_NAME name) + ./$TEST_PATH/compare_strings.sh $RESULT $ORG_NAME "Authenticate Upsun CLI user" + upsun auth:info username - name: "[setup_cli_auth] 1. Authenticate Upsun CLI to allow push from workflow." run: | echo "::notice::Generating SSH certificate for Upsun CLI." @@ -59,13 +65,6 @@ jobs: chmod 644 $UPSUN_HOST_FILE ssh-keyscan ssh.$UPSUN_HOST_REGION.$UPSUN_HOST_SUFFIX -v >> $UPSUN_HOST_FILE ssh-keyscan git.$UPSUN_HOST_REGION.$UPSUN_HOST_SUFFIX -v >> $UPSUN_HOST_FILE - - name: "[setup_cli_auth] 2. Test: an authenticated CLI can retrieve organization info." - run: | - echo "::notice::Verifying CLI is authenticated correctly." - RESULT=$(upsun org:info -o $ORG_NAME name) - ./$TEST_PATH/compare_strings.sh $RESULT $ORG_NAME "Authenticate Upsun CLI user" - upsun auth:info username - # ################################################################################################ # # A. Setting up tools and authentication to test project/organization. diff --git a/utils/tests/ssh-certs.sh b/utils/tests/ssh-certs.sh new file mode 100644 index 00000000..c372954c --- /dev/null +++ b/utils/tests/ssh-certs.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +upsun ssh-cert:info -P filename +upsun ssh-cert:info -P valid_before \ No newline at end of file