Use new pipes workspace for testing (#4182)

This commit is contained in:
Puskar Basu
2024-03-14 13:26:33 +05:30
committed by GitHub
parent 18df37c591
commit bad026b938
2 changed files with 6 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
@test "connect to cloud workspace - passing the cloud-token arg and the workspace name to workspace-database arg" {
# run steampipe query and fetch an account from the cloud workspace
run steampipe query "select account_aliases from all_aws.aws_account where account_id='632902152528'" --pipes-token $SPIPETOOLS_TOKEN --workspace-database spipetools/toolstest --output json
run steampipe query "select account_aliases from all_aws.aws_account where account_id='632902152528'" --pipes-token $SPIPETOOLS_TOKEN --workspace-database turbot-ops/clitesting --output json
echo $output
# fetch the value of account_alias to compare
@@ -33,7 +33,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
@test "connect to cloud workspace - passing the cloud-host arg, the cloud-token arg and the workspace name to workspace-database arg" {
# run steampipe query and fetch an account from the cloud workspace
run steampipe query "select account_aliases from all_aws.aws_account where account_id='632902152528'" --pipes-host "pipes.turbot.com" --pipes-token $SPIPETOOLS_TOKEN --workspace-database spipetools/toolstest --output json
run steampipe query "select account_aliases from all_aws.aws_account where account_id='632902152528'" --pipes-host "pipes.turbot.com" --pipes-token $SPIPETOOLS_TOKEN --workspace-database turbot-ops/clitesting --output json
echo $output
# fetch the value of account_alias to compare
@@ -46,7 +46,7 @@ load "$LIB_BATS_SUPPORT/load.bash"
@test "connect to cloud workspace(FAILED TO CONNECT) - passing wrong postgres connection string to workspace-database arg" {
# run steampipe query using wrong connection string
run steampipe query "select account_aliases from all_aws.aws_account where account_id='632902152528'" --workspace-database abcd --output json
run steampipe query "select account_aliases from all_aws.aws_account where account_id='632902152528'" --workspace-database abcd/efgh --output json
echo $output
# check the error message

View File

@@ -17,7 +17,7 @@ function setup() {
@test "snapshot mode - query output csv" {
cd $FILE_PATH/test_data/mods/functionality_test_mod
steampipe query query.static_query_2 --snapshot --output csv --cloud-token $SPIPETOOLS_TOKEN --snapshot-location spipetools/toolstest > output.csv
steampipe query query.static_query_2 --snapshot --output csv --pipes-token $SPIPETOOLS_TOKEN --snapshot-location turbot-ops/clitesting > output.csv
# extract the snapshot url from the output
url=$(grep -o 'http[^"]*' output.csv)
@@ -46,7 +46,7 @@ function setup() {
@test "snapshot mode - query output json" {
cd $FILE_PATH/test_data/mods/functionality_test_mod
steampipe query query.static_query_2 --snapshot --output json --cloud-token $SPIPETOOLS_TOKEN --snapshot-location spipetools/toolstest > output.json
steampipe query query.static_query_2 --snapshot --output json --pipes-token $SPIPETOOLS_TOKEN --snapshot-location turbot-ops/clitesting > output.json
# extract the snapshot url from the output
url=$(grep -o 'http[^"]*' output.json)
@@ -75,7 +75,7 @@ function setup() {
@test "snapshot mode - query output table" {
cd $FILE_PATH/test_data/mods/functionality_test_mod
steampipe query query.static_query_2 --snapshot --output table --cloud-token $SPIPETOOLS_TOKEN --snapshot-location spipetools/toolstest > output.txt
steampipe query query.static_query_2 --snapshot --output table --pipes-token $SPIPETOOLS_TOKEN --snapshot-location turbot-ops/clitesting > output.txt
# extract the snapshot url from the output
url=$(grep -o 'http[^"]*' output.txt)