From 90c8e9c1205eb2ccbe84e40e22fd97108819ed2c Mon Sep 17 00:00:00 2001 From: General Kroll Date: Wed, 21 May 2025 20:49:35 +1000 Subject: [PATCH] idempotent-dependency-management added-aws-iam-test-ro Alt AWS IAM test --- scripts/local/ci/01-gather.sh | 23 ++++++++++++-- .../stackql/live/readonly/live_readonly.robot | 31 +++++++++++++------ 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/scripts/local/ci/01-gather.sh b/scripts/local/ci/01-gather.sh index 026bfb21..5f6c8a7b 100755 --- a/scripts/local/ci/01-gather.sh +++ b/scripts/local/ci/01-gather.sh @@ -8,7 +8,26 @@ REPOSITORY_ROOT_DIR="$(realpath ${SCRIPT_DIR}/../../..)" cd "${REPOSITORY_ROOT_DIR}" -git clone --revision=refs/heads/main https://github.com/stackql/stackql.git stackql-core -git clone --revision=refs/heads/main https://github.com/stackql/any-sdk.git stackql-any-sdk +# Check if the directory already exists +if [ -d "stackql-core" ]; then + >&2 echo "Directory stackql-core already exists. Skipping clone." + cd "${REPOSITORY_ROOT_DIR}/stackql-core" + git pull origin main + cd "${REPOSITORY_ROOT_DIR}" +else + >&2 echo "Cloning stackql-core repository..." + git clone --revision=refs/heads/main https://github.com/stackql/stackql.git stackql-core +fi + +# Check if the directory already exists +if [ -d "stackql-any-sdk" ]; then + >&2 echo "Directory stackql-any-sdk already exists. Skipping clone." + cd "${REPOSITORY_ROOT_DIR}/stackql-any-sdk" + git pull origin main + cd "${REPOSITORY_ROOT_DIR}" +else + >&2 echo "Cloning stackql-any-sdk repository..." + git clone --revision=refs/heads/main https://github.com/stackql/any-sdk.git stackql-any-sdk +fi diff --git a/test/robot/stackql/live/readonly/live_readonly.robot b/test/robot/stackql/live/readonly/live_readonly.robot index ac6bf103..8448e231 100644 --- a/test/robot/stackql/live/readonly/live_readonly.robot +++ b/test/robot/stackql/live/readonly/live_readonly.robot @@ -49,13 +49,24 @@ AWS Route53 List Record Sets Simple ... ${EMPTY} ... AWS-Route53-List-Record-Sets-Simple -# AWS IAM Users Subquery Left Joined With Aliasing and Name Collision -# [Documentation] AWS IAM Users Complex Query. Acceptable to hardcoode region for global resource. -# [Tags] aws iam users aws.iam aws.iam.users tier_1 -# ${inputStr} = Catenate -# ... select u1.UserName, u.UserId, u.Arn, u1.region from ( select Arn, UserName, UserId from aws.iam.users where region = 'us-east-1' ) u inner join aws.iam.users u1 on u1.Arn = u.Arn where region = 'us-east-1' order by u1.UserName desc; -# Stock Stackql Exec Inline Contains Both Streams -# ... ${inputStr} -# ... UserName -# ... ${EMPTY} -# ... AWS-IAM-Users-Subquery-Left-Joined-With-Aliasing-and-Name-Collision +AWS IAM Users Simple Admin Exists + [Documentation] AWS IAM Users Simple Query. Acceptable to hardcoode region for global resource. + [Tags] aws iam users aws.iam aws.iam.users tier_1 + ${inputStr} = Catenate + ... select split_part(arn, ':', -1) as arn_extract, user_name from aws.iam.users where region = 'us-east-1' and user_name = 'kieran.rimmer'; + Stock Stackql Exec Inline Contains Both Streams + ... ${inputStr} + ... user/kieran.rimmer + ... ${EMPTY} + ... AWS-IAM-Users-Simple-Admin-Exists + +AWS IAM Users Simple Alt Admin Exists + [Documentation] AWS IAM Users Simple Query. Acceptable to hardcoode region for global resource. + [Tags] aws iam users aws.iam aws.iam.users tier_1 + ${inputStr} = Catenate + ... select split_part(arn, ':', -1) as arn_extract, user_name from aws.iam.users where region = 'us-east-1' and user_name = 'jeffrey.aven'; + Stock Stackql Exec Inline Contains Both Streams + ... ${inputStr} + ... user/jeffrey.aven + ... ${EMPTY} + ... AWS-IAM-Users-Simple-Alt-Admin-Exists