From 2aaf387a2a150fcade931a22baaaa2325f1ba26f Mon Sep 17 00:00:00 2001 From: Puskar Basu <45908484+pskrbasu@users.noreply.github.com> Date: Fri, 9 Jun 2023 14:55:24 +0530 Subject: [PATCH] Add Linux ARM tests in Steampipe Release (CLI and Assets) workflow. Closes #3468 --- .github/workflows/release_cli_and_assets.yml | 272 ++++++++++++------ tests/acceptance/run-linux-arm.sh | 85 ++++++ tests/acceptance/run-local.sh | 2 +- .../.mod.cache.json | 35 ++- .../pskrbasu/steampipe-mod-m1@v4.0/.gitignore | 33 --- .../steampipe-mod-m1@v4.0/dashboard.sp | 24 -- .../pskrbasu/steampipe-mod-m1@v4.0/mod.sp | 3 - .../pskrbasu/steampipe-mod-m1@v4.0/query.sp | 3 - .../dashboard.sp | 16 -- .../dependent_mod_with_legacy_lock/mod.sp | 4 +- .../test_files/chaos_and_query.bats | 1 + tests/acceptance/test_files/migration.bats | 19 +- .../acceptance/test_files/schema_cloning.bats | 5 + tests/acceptance/test_files/search_path.bats | 1 + 14 files changed, 323 insertions(+), 180 deletions(-) create mode 100755 tests/acceptance/run-linux-arm.sh delete mode 100644 tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/.gitignore delete mode 100644 tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/dashboard.sp delete mode 100644 tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/mod.sp delete mode 100644 tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/query.sp delete mode 100644 tests/acceptance/test_data/dependent_mod_with_legacy_lock/dashboard.sp diff --git a/.github/workflows/release_cli_and_assets.yml b/.github/workflows/release_cli_and_assets.yml index 57cdfbdf0..f442e3391 100644 --- a/.github/workflows/release_cli_and_assets.yml +++ b/.github/workflows/release_cli_and_assets.yml @@ -312,9 +312,7 @@ jobs: platform: [ macos-latest ] test_block: - "migration" - - "brew" - "service_and_plugin" - - "blank_aggregators" - "search_path" - "chaos_and_query" - "dynamic_schema" @@ -411,92 +409,196 @@ jobs: chmod +x $GITHUB_WORKSPACE/tests/acceptance/run.sh $GITHUB_WORKSPACE/tests/acceptance/run.sh ${{ matrix.test_block }}.bats steampipe service stop --force -# -# docker_acceptance_test_debian: -# name: Acceptance tests(Docker - Debian) -# needs: [create_test_build,build_and_release_assets] -# runs-on: ubuntu-latest -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# with: -# ref: ${{ github.event.ref }} -# -# - name: Prepare for downloads -# id: prepare-for-downloads -# run: | -# mkdir ~/artifacts -# -# - name: Download Linux Build Artifacts -# uses: actions/download-artifact@v3 -# with: -# name: build-artifact-linux -# path: ~/artifacts -# -# - name: Extract Ubuntu Artifacts and Install Binary -# run: | -# mkdir ~/build -# tar -xf ~/artifacts/linux.tar.gz -C ~/build -# -# - name: Copy binary -# run: | -# cp ~/build/steampipe tests/dockertesting/debian -# -# - name: Build steampipe docker images -# run: | -# docker build -t spdebian tests/dockertesting/debian --build-arg TARGETBRANCH="${{ github.event.ref }}" -# docker images -# -# - name: Create a container and run the test suite -# timeout-minutes: 15 -# run: | -# docker run --name steampipe-deb `docker images -q spdebian` -# echo "docker run complete" -# -# docker_acceptance_test_oraclelinux: -# name: Acceptance tests(Docker - OracleLinux) -# needs: [create_test_build,build_and_release_assets] -# runs-on: ubuntu-latest -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# with: -# ref: ${{ github.event.ref }} -# -# - name: Prepare for downloads -# id: prepare-for-downloads -# run: | -# mkdir ~/artifacts -# -# - name: Download Linux Build Artifacts -# uses: actions/download-artifact@v3 -# with: -# name: build-artifact-linux -# path: ~/artifacts -# -# - name: Extract Ubuntu Artifacts and Install Binary -# run: | -# mkdir ~/build -# tar -xf ~/artifacts/linux.tar.gz -C ~/build -# -# - name: Copy binary -# run: | -# cp ~/build/steampipe tests/dockertesting/oraclelinux -# -# - name: Build steampipe docker images -# run: | -# docker build -t sporacle tests/dockertesting/oraclelinux --build-arg TARGETBRANCH="${{ github.event.ref }}" -# docker images -# -# - name: Create a container and run the test suite -# timeout-minutes: 15 -# run: | -# docker run --name steampipe-oracle `docker images -q sporacle` -# echo "docker run complete" + + + # docker_acceptance_test_debian: + # name: Acceptance tests(Docker - Debian) + # needs: [create_test_build,build_and_release_assets] + # runs-on: ubuntu-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + # with: + # ref: ${{ github.event.ref }} + + # - name: Prepare for downloads + # id: prepare-for-downloads + # run: | + # mkdir ~/artifacts + + # - name: Download Linux Build Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: build-artifact-linux + # path: ~/artifacts + + # - name: Extract Ubuntu Artifacts and Install Binary + # run: | + # mkdir ~/build + # tar -xf ~/artifacts/linux.tar.gz -C ~/build + + # - name: Copy binary + # run: | + # cp ~/build/steampipe tests/dockertesting/debian + + # - name: Build steampipe docker images + # run: | + # docker build -t spdebian tests/dockertesting/debian --build-arg TARGETBRANCH="${{ github.event.ref }}" + # docker images + + # - name: Create a container and run the test suite + # timeout-minutes: 15 + # run: | + # docker run --name steampipe-deb `docker images -q spdebian` + # echo "docker run complete" + + # docker_acceptance_test_oraclelinux: + # name: Acceptance tests(Docker - OracleLinux) + # needs: [create_test_build,build_and_release_assets] + # runs-on: ubuntu-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + # with: + # ref: ${{ github.event.ref }} + + # - name: Prepare for downloads + # id: prepare-for-downloads + # run: | + # mkdir ~/artifacts + + # - name: Download Linux Build Artifacts + # uses: actions/download-artifact@v3 + # with: + # name: build-artifact-linux + # path: ~/artifacts + + # - name: Extract Ubuntu Artifacts and Install Binary + # run: | + # mkdir ~/build + # tar -xf ~/artifacts/linux.tar.gz -C ~/build + + # - name: Copy binary + # run: | + # cp ~/build/steampipe tests/dockertesting/oraclelinux + + # - name: Build steampipe docker images + # run: | + # docker build -t sporacle tests/dockertesting/oraclelinux --build-arg TARGETBRANCH="${{ github.event.ref }}" + # docker images + + # - name: Create a container and run the test suite + # timeout-minutes: 15 + # run: | + # docker run --name steampipe-oracle `docker images -q sporacle` + # echo "docker run complete" + + linux_arm_acceptance_tests: + name: Linux ARM64 acceptance tests + needs: [create_test_build,build_and_release_assets] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + ref: ${{ github.event.ref }} + + - name: Configure AWS Credentials + run: | + mkdir ~/.aws + echo -e "[default]\naws_access_key_id = ${{ secrets.ACC_TEST_ARM_LINUX_AWS_ACCESS_KEY_ID }}\naws_secret_access_key = ${{ secrets.ACC_TEST_ARM_LINUX_AWS_SECRET_ACCESS_KEY }}\nregion = ap-south-1" > ~/.aws/credentials + + - name: SSH into the EC2 instance and run tests + id: ssh-and-run-test-suite + timeout-minutes: 20 + continue-on-error: true + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ACC_TEST_ARM_LINUX_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ACC_TEST_ARM_LINUX_AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: 'ap-south-1' + PRIVATE_KEY: ${{ secrets.ACC_TEST_ARM_LINUX_AWS_PRIVATE_KEY }} + run: | + # echo $ref + ref=${{ github.event.ref }} + + # get branch + branch=$(echo "$ref" | sed 's/.*\///') + + # get public IP of this runner + ip=$(dig +short myip.opendns.com @resolver1.opendns.com) + echo $ip + + # set PAGER to empty to not get cli output automatically being sent to vim + export PAGER= + + # whitelist the ip, add the ip to the security group to allow access into the instance + aws ec2 authorize-security-group-ingress --group-name pskr-sg --protocol tcp --port 22 --cidr $ip/32 --region ap-south-1 + + #start instance + aws ec2 start-instances --instance-ids i-09b87c86dfdfcd2bd --region ap-south-1 --output text + echo "starting instance..." + sleep 60 + + # get the public ip and status of the instance + public_ip=$(aws ec2 describe-instances --instance-ids i-09b87c86dfdfcd2bd --query 'Reservations[*].Instances[*].PublicDnsName' --region ap-south-1 --output text) + status=$(aws ec2 describe-instance-status --instance-ids i-09b87c86dfdfcd2bd --query 'InstanceStatuses[*].InstanceState.Name' --region ap-south-1 --output text) + echo $public_ip + echo $status + + # check if the instance is available for use, if not, then wait for it + while [ $status != "running" ] ; do + echo "instance not yet available" + sleep 5 + status=$(aws ec2 describe-instance-status --instance-ids i-09b87c86dfdfcd2bd --query 'InstanceStatuses[*].InstanceState.Name' --region ap-south-1 --output text) + done + + # set up the private key + echo "$PRIVATE_KEY" > private_key && chmod 600 private_key + + #pwd + pwd + chmod +x tests/acceptance/run-linux-arm.sh + + # ssh into the instance and run the full acceptance test suite + ssh -o StrictHostKeyChecking=accept-new -i private_key ubuntu@$public_ip 'bash -s' < tests/acceptance/run-linux-arm.sh $branch + + # success if all tests passed + echo "success" + + - name: Stop the running instance + if: always() + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ACC_TEST_ARM_LINUX_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ACC_TEST_ARM_LINUX_AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: 'ap-south-1' + PRIVATE_KEY: ${{ secrets.ACC_TEST_ARM_LINUX_AWS_PRIVATE_KEY }} + run: | + # get public IP of this runner + ip=$(dig +short myip.opendns.com @resolver1.opendns.com) + echo $ip + + # stop instance + aws ec2 stop-instances --instance-ids i-09b87c86dfdfcd2bd --region ap-south-1 + + # remove the ip from the security group + aws ec2 revoke-security-group-ingress --group-name pskr-sg --protocol tcp --port 22 --cidr $ip/32 --region ap-south-1 + + # fin + echo "fin" + + - name: Check if passed/failed + if: always() + run: | + if [ ${{ steps.ssh-and-run-test-suite.outcome }} == 'success' ]; then + exit 0 + else + exit 1 + fi create_release_tag: name: Tag Release - needs: [run_acceptance_tests] + needs: [run_acceptance_tests,linux_arm_acceptance_tests] runs-on: ubuntu-latest steps: - name: Trim asset version prefix and Validate diff --git a/tests/acceptance/run-linux-arm.sh b/tests/acceptance/run-linux-arm.sh new file mode 100755 index 000000000..f02125597 --- /dev/null +++ b/tests/acceptance/run-linux-arm.sh @@ -0,0 +1,85 @@ +#!/bin/bash -e + +#function that makes the script exit, if any command fails +exit_if_failed () { +if [ $? -ne 0 ] +then + exit 1 +fi +} + +echo "Check arch and export GOROOT & GOPATH" +uname -m +export GOROOT=/usr/local/go +export PATH=$GOPATH/bin:$GOROOT/bin:$PATH +echo "" + +echo "Check go version" +go version +exit_if_failed +echo "" + +echo "remove existing .steampipe install dir(if any)" +rm -rf ~/.steampipe + +echo "Checkout to cloned steampipe repo" +cd steampipe +pwd +echo "" + +echo "git reset" +git reset +exit_if_failed +echo "" + +echo "git restore all changed files(if any)" +git restore . +exit_if_failed +echo "" + +echo "git pull origin main" +git checkout main +git pull origin main +exit_if_failed +echo "" + +echo "delete all existing local branches" +git branch | grep -v "main" | xargs git branch -D +exit_if_failed +echo "" + +echo "git fetch" +git fetch +exit_if_failed +echo "" + +echo "git checkout " +input=$1 +echo $input +git checkout $input +git branch --list +exit_if_failed +echo "" + +echo "build steampipe and set PATH" +go build -o ~/bin/steampipe +exit_if_failed +export PATH=$PATH:/home/ubuntu/bin +steampipe -v +exit_if_failed +echo "" + +echo "install steampipe and test pre-requisites" +steampipe service start +steampipe plugin install chaos chaosdynamic --progress=false +steampipe service stop +exit_if_failed +echo "" + +echo "run acceptance tests" +./tests/acceptance/run.sh +exit_if_failed +echo "" + +echo "Hallelujah!" +exit 0 diff --git a/tests/acceptance/run-local.sh b/tests/acceptance/run-local.sh index dcea1866a..2a90911a9 100755 --- a/tests/acceptance/run-local.sh +++ b/tests/acceptance/run-local.sh @@ -17,7 +17,7 @@ echo "Install directory: $STEAMPIPE_INSTALL_DIR" steampipe query "select 1 as setup_complete" echo "Installation complete at $STEAMPIPE_INSTALL_DIR" echo "Installing CHAOS and CHAOSDYNAMIC" -steampipe plugin install chaos chaosdynamic +steampipe plugin install chaos chaosdynamic --progress=false echo "Installed CHAOS and CHAOSDYNAMIC" if [ $# -eq 0 ]; then diff --git a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.mod.cache.json b/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.mod.cache.json index 4fc7c53c5..eb3dda689 100644 --- a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.mod.cache.json +++ b/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.mod.cache.json @@ -1,10 +1,35 @@ { - "local": { - "github.com/pskrbasu/steampipe-mod-m1": { - "name": "github.com/pskrbasu/steampipe-mod-m1", - "alias": "m1", + "github.com/pskrbasu/steampipe-mod-dependency-2@v3.0.0": { + "github.com/pskrbasu/steampipe-mod-dependency-1": { + "name": "github.com/pskrbasu/steampipe-mod-dependency-1", + "alias": "dependency_1", + "version": "3.0.0", + "constraint": "v3.0.0", + "struct_version": 20220411 + } + }, + "github.com/pskrbasu/steampipe-mod-top-level@v3.0.0": { + "github.com/pskrbasu/steampipe-mod-dependency-1": { + "name": "github.com/pskrbasu/steampipe-mod-dependency-1", + "alias": "dependency_1", "version": "4.0.0", - "constraint": "4.0", + "constraint": "v4.0.0", + "struct_version": 20220411 + }, + "github.com/pskrbasu/steampipe-mod-dependency-2": { + "name": "github.com/pskrbasu/steampipe-mod-dependency-2", + "alias": "dependency_2", + "version": "3.0.0", + "constraint": "*", + "struct_version": 20220411 + } + }, + "local": { + "github.com/pskrbasu/steampipe-mod-top-level": { + "name": "github.com/pskrbasu/steampipe-mod-top-level", + "alias": "top_level", + "version": "3.0.0", + "constraint": "3.0.0", "struct_version": 20220411 } } diff --git a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/.gitignore b/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/.gitignore deleted file mode 100644 index 77d90c348..000000000 --- a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically wh.en used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Ignore JetBrains files -.idea - -# Ignore swap files -*.swo -*.swp - -# Parliament IAM permissions outputs -scripts/generate_parliament_iam_permissions/__pycache__ -scripts/generate_parliament_iam_permissions/docs -scripts/generate_parliament_iam_permissions/generate_go_file. - -# Ignore node dependencies -node_modules - -# Ignore file types -.vscode/launch.json diff --git a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/dashboard.sp b/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/dashboard.sp deleted file mode 100644 index bf379dcbf..000000000 --- a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/dashboard.sp +++ /dev/null @@ -1,24 +0,0 @@ -chart global_chart { - title = "chart global m1_c1" - sql = "select 'm1_global_c1' as chart" -} - -input "global_input" { - title = "global input m1_i1" - sql = "select 1" -} - - -dashboard m1_d1 { - title = "dashboard d1" - - chart { - title = "chart c1" - sql = "select 'm1_d1_c1' as chart" - } - - input "i1" { - title = "input i1" - sql = "select 1" - } -} diff --git a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/mod.sp b/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/mod.sp deleted file mode 100644 index 597d21b8b..000000000 --- a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/mod.sp +++ /dev/null @@ -1,3 +0,0 @@ -mod "m1" { - title = "m1" -} diff --git a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/query.sp b/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/query.sp deleted file mode 100644 index d3662fbbe..000000000 --- a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/.steampipe/mods/github.com/pskrbasu/steampipe-mod-m1@v4.0/query.sp +++ /dev/null @@ -1,3 +0,0 @@ -query "m1_q1"{ - sql = "select 1 as query" -} diff --git a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/dashboard.sp b/tests/acceptance/test_data/dependent_mod_with_legacy_lock/dashboard.sp deleted file mode 100644 index 643dfb812..000000000 --- a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/dashboard.sp +++ /dev/null @@ -1,16 +0,0 @@ -chart chart1{ - title = "chart 1" - query = m1.query.m1_q1 -} - -dashboard local_d1 { - title = "dashboard d1" - - chart { - base = m1.chart.global_chart - } - - input "i1" { - base = m1.input.global_input - } -} \ No newline at end of file diff --git a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/mod.sp b/tests/acceptance/test_data/dependent_mod_with_legacy_lock/mod.sp index cf17a7741..ba1ab50df 100644 --- a/tests/acceptance/test_data/dependent_mod_with_legacy_lock/mod.sp +++ b/tests/acceptance/test_data/dependent_mod_with_legacy_lock/mod.sp @@ -1,8 +1,8 @@ mod "local" { title = "dependent_mod" require { - mod "github.com/pskrbasu/steampipe-mod-m1" { - version = "4.0" + mod "github.com/pskrbasu/steampipe-mod-top-level" { + version = "3.0.0" } } } diff --git a/tests/acceptance/test_files/chaos_and_query.bats b/tests/acceptance/test_files/chaos_and_query.bats index b61af4b47..169e0daf0 100644 --- a/tests/acceptance/test_files/chaos_and_query.bats +++ b/tests/acceptance/test_files/chaos_and_query.bats @@ -200,6 +200,7 @@ load "$LIB_BATS_SUPPORT/load.bash" @test "migrate legacy lock file" { cd $FILE_PATH/test_data/dependent_mod_with_legacy_lock + steampipe mod install # run steampipe query twice - the bug we are testing for caused the workspace lock to be deleted after the first query steampipe query "select 1 as a" --output json run steampipe query "select 1 as a" --output json diff --git a/tests/acceptance/test_files/migration.bats b/tests/acceptance/test_files/migration.bats index a9c80cd64..d999d5f80 100644 --- a/tests/acceptance/test_files/migration.bats +++ b/tests/acceptance/test_files/migration.bats @@ -1,14 +1,6 @@ load "$LIB_BATS_ASSERT/load.bash" load "$LIB_BATS_SUPPORT/load.bash" -@test "migrate legacy lock file" { - cd $FILE_PATH/test_data/dependent_mod_with_legacy_lock - # run steampipe query twice - the bug we are testing for caused the workspace lock to be deleted after the first query - steampipe query "select 1 as a" --output json - run steampipe query "select 1 as a" --output json - assert_equal "$output" "$(cat $TEST_DATA_DIR/expected_15.json)" -} - ## public schema migration @test "verify data is properly migrated when upgrading from v0.13.6" { @@ -82,3 +74,14 @@ load "$LIB_BATS_SUPPORT/load.bash" rm -rf $tmpdir rm -f verify* } + +function setup() { + # skip if this test is run on Linux ARM64, since there is no linux_arm binary available + # for v0.13.6 to run this test + sys=$(uname -sm) + if [[ "$sys" == "Linux aarch64" ]]; then + skip + else + echo "Running migration test..." + fi +} \ No newline at end of file diff --git a/tests/acceptance/test_files/schema_cloning.bats b/tests/acceptance/test_files/schema_cloning.bats index ac1f3b496..14126fcb3 100644 --- a/tests/acceptance/test_files/schema_cloning.bats +++ b/tests/acceptance/test_files/schema_cloning.bats @@ -23,3 +23,8 @@ load "$LIB_BATS_SUPPORT/load.bash" run steampipe query "select * from chaos2.chaos_all_column_types" assert_success } + +function teardown() { + # remove the files created as part of these tests + rm -f $STEAMPIPE_INSTALL_DIR/config/two_chaos.spc +} diff --git a/tests/acceptance/test_files/search_path.bats b/tests/acceptance/test_files/search_path.bats index f3d08753b..34961184d 100644 --- a/tests/acceptance/test_files/search_path.bats +++ b/tests/acceptance/test_files/search_path.bats @@ -2,6 +2,7 @@ load "$LIB_BATS_ASSERT/load.bash" load "$LIB_BATS_SUPPORT/load.bash" @test "add connection, check search path updated" { + cp $SRC_DATA_DIR/single_chaos.spc $STEAMPIPE_INSTALL_DIR/config/chaos.spc run steampipe query "show search_path" assert_output "$(cat $TEST_DATA_DIR/expected_search_path_1.txt)" cp $SRC_DATA_DIR/two_chaos.spc $STEAMPIPE_INSTALL_DIR/config/chaos.spc