|
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | +*** Settings *** |
| 5 | +Resource ${CURDIR}/stackql.resource |
| 6 | + |
| 7 | +*** Test Cases *** |
| 8 | + |
| 9 | +ID Fed AWS S3 Buckets List |
| 10 | + Sleep 2s |
| 11 | + ${awsAuthCfg} = Catenate |
| 12 | + ... { "aws": { "type":"aws_signing_v4", "keyIDenvvar": "AWS_ACCESS_KEY_ID", "credentialsenvvar": "AWS_SECRET_ACCESS_KEY" } } |
| 13 | + ${bucketsListQuery} = Catenate |
| 14 | + ... select * from aws.pseudo_s3.buckets_list_only where region = 'ap-southeast-2'; |
| 15 | + ${result} = Run Process |
| 16 | + ... ${STACKQL_EXE} |
| 17 | + ... \-\-auth |
| 18 | + ... ${awsAuthCfg} |
| 19 | + ... \-\-registry |
| 20 | + ... { "url": "file://${REPOSITORY_ROOT}/test/registry", "localDocRoot": "${REPOSITORY_ROOT}/test/registry", "verifyConfig": { "nopVerify": true } } |
| 21 | + ... exec |
| 22 | + ... ${bucketsListQuery} |
| 23 | + ... cwd=${REPOSITORY_ROOT} |
| 24 | + ... stdout=${CURDIR}/tmp/ID-Fed-AWS-S3-Buckets-List.tmp |
| 25 | + ... stderr=${CURDIR}/tmp/ID-Fed-AWS-S3-Buckets-List-stderr.tmp |
| 26 | + Should Be Equal As Integers ${result.rc} 0 |
| 27 | + Should Be Empty ${result.stderr} |
| 28 | + Should Contain ${result.stdout} stackql\-trial\-bucket\-02 |
| 29 | + |
| 30 | + |
| 31 | +ID Fed Azure VNETs List |
| 32 | + Sleep 2s |
| 33 | + ${azureTargetSubscription} = OperatingSystem.Get Environment Variable AZURE_TARGET_SUBSCRIPTION_ID |
| 34 | + Should Not Be Empty ${azureTargetSubscription} |
| 35 | + ${azureAuthCfg} = Catenate |
| 36 | + ... { "azure": { "type":"azure_default" } } |
| 37 | + ${bucketsListQuery} = Catenate |
| 38 | + ... select location, name from azure.network.virtual_networks where subscriptionId = '${azureTargetSubscription}'; |
| 39 | + ${result} = Run Process |
| 40 | + ... ${STACKQL_EXE} |
| 41 | + ... \-\-auth |
| 42 | + ... ${azureAuthCfg} |
| 43 | + ... \-\-registry |
| 44 | + ... { "url": "file://${REPOSITORY_ROOT}/test/registry", "localDocRoot": "${REPOSITORY_ROOT}/test/registry", "verifyConfig": { "nopVerify": true } } |
| 45 | + ... exec |
| 46 | + ... ${bucketsListQuery} |
| 47 | + ... cwd=${REPOSITORY_ROOT} |
| 48 | + ... stdout=${CURDIR}/tmp/ID-Fed-Azure-VNETs-List.tmp |
| 49 | + ... stderr=${CURDIR}/tmp/ID-Fed-Azure-VNETs-List-stderr.tmp |
| 50 | + Should Be Equal As Integers ${result.rc} 0 |
| 51 | + Should Be Empty ${result.stderr} |
| 52 | + Should Contain ${result.stdout} inspector\-network |
| 53 | + |
| 54 | + |
| 55 | +ID Fed Google Buckets List |
| 56 | + Sleep 2s |
| 57 | + ${gcpCredentialsFile} = OperatingSystem.Get Environment Variable GOOGLE_APPLICATION_CREDENTIALS |
| 58 | + Should Not Be Empty ${gcpCredentialsFile} |
| 59 | + ${gcpAuthCfg} = Catenate |
| 60 | + ... { "google": { "type":"service_account", "credentialsfilepath": "${gcpCredentialsFile}" } } |
| 61 | + ${bucketsListQuery} = Catenate |
| 62 | + ... select location, name from google.storage.buckets where project = 'stackql-demo'; |
| 63 | + ${result} = Run Process |
| 64 | + ... ${STACKQL_EXE} |
| 65 | + ... \-\-auth |
| 66 | + ... ${gcpAuthCfg} |
| 67 | + ... \-\-registry |
| 68 | + ... { "url": "file://${REPOSITORY_ROOT}/test/registry", "localDocRoot": "${REPOSITORY_ROOT}/test/registry", "verifyConfig": { "nopVerify": true } } |
| 69 | + ... exec |
| 70 | + ... ${bucketsListQuery} |
| 71 | + ... cwd=${REPOSITORY_ROOT} |
| 72 | + ... stdout=${CURDIR}/tmp/ID-Fed-Google-Buckets-List.tmp |
| 73 | + ... stderr=${CURDIR}/tmp/ID-Fed-Google-Buckets-List-stderr.tmp |
| 74 | + Should Be Equal As Integers ${result.rc} 0 |
| 75 | + Should Be Empty ${result.stderr} |
| 76 | + Should Contain ${result.stdout} stackql\-demo\-bucket |
0 commit comments