diff --git a/tests/acceptance/test_data/functionality_test_mod/functionality/search_path.sp b/tests/acceptance/test_data/functionality_test_mod/functionality/search_path.sp deleted file mode 100644 index 5ff92d569..000000000 --- a/tests/acceptance/test_data/functionality_test_mod/functionality/search_path.sp +++ /dev/null @@ -1,57 +0,0 @@ -benchmark "check_search_path_benchmark" { - title = "Benchmark to test search path and search path prefix functionalities in steampipe check" - children = [ - control.search_path_test_1, - control.search_path_test_2, - control.search_path_test_3, - control.search_path_test_4, - control.search_path_test_5, - control.search_path_test_6 - ] -} - -control "search_path_test_1" { - title = "Control to test search path prefix functionality when entered through CLI" - description = "Control to test search path prefix functionality when entered through CLI." - sql = query.search_path_1.sql - severity = "high" -} - -control "search_path_test_2" { - title = "Control to test search path functionality when entered through CLI" - description = "Control to test search path functionality when entered through CLI." - sql = query.search_path_2.sql - severity = "high" -} - -control "search_path_test_3" { - title = "Control to test search path and prefix functionality when entered through CLI" - description = "Control to test search path and prefix functionality when entered through CLI." - sql = query.search_path_1.sql - severity = "high" -} - -control "search_path_test_4" { - title = "Control to test search path prefix functionality when entered through control" - description = "Control to test search path prefix functionality when entered through control." - sql = query.search_path_1.sql - search_path_prefix = "aws" - severity = "high" -} - -control "search_path_test_5" { - title = "Control to test search path functionality when entered through control" - description = "Control to test search path functionality when entered through control." - sql = query.search_path_2.sql - search_path = "chaos,b,c" - severity = "high" -} - -control "search_path_test_6" { - title = "Control to test search path and prefix functionality when entered through control" - description = "Control to test search path and prefix functionality when entered through control." - sql = query.search_path_1.sql - search_path_prefix = "aws" - search_path = "a,b,c" - severity = "high" -} \ No newline at end of file diff --git a/tests/acceptance/test_data/sample_workspace/cis_v130/search_path.sp b/tests/acceptance/test_data/sample_workspace/cis_v130/search_path.sp deleted file mode 100644 index 5ff92d569..000000000 --- a/tests/acceptance/test_data/sample_workspace/cis_v130/search_path.sp +++ /dev/null @@ -1,57 +0,0 @@ -benchmark "check_search_path_benchmark" { - title = "Benchmark to test search path and search path prefix functionalities in steampipe check" - children = [ - control.search_path_test_1, - control.search_path_test_2, - control.search_path_test_3, - control.search_path_test_4, - control.search_path_test_5, - control.search_path_test_6 - ] -} - -control "search_path_test_1" { - title = "Control to test search path prefix functionality when entered through CLI" - description = "Control to test search path prefix functionality when entered through CLI." - sql = query.search_path_1.sql - severity = "high" -} - -control "search_path_test_2" { - title = "Control to test search path functionality when entered through CLI" - description = "Control to test search path functionality when entered through CLI." - sql = query.search_path_2.sql - severity = "high" -} - -control "search_path_test_3" { - title = "Control to test search path and prefix functionality when entered through CLI" - description = "Control to test search path and prefix functionality when entered through CLI." - sql = query.search_path_1.sql - severity = "high" -} - -control "search_path_test_4" { - title = "Control to test search path prefix functionality when entered through control" - description = "Control to test search path prefix functionality when entered through control." - sql = query.search_path_1.sql - search_path_prefix = "aws" - severity = "high" -} - -control "search_path_test_5" { - title = "Control to test search path functionality when entered through control" - description = "Control to test search path functionality when entered through control." - sql = query.search_path_2.sql - search_path = "chaos,b,c" - severity = "high" -} - -control "search_path_test_6" { - title = "Control to test search path and prefix functionality when entered through control" - description = "Control to test search path and prefix functionality when entered through control." - sql = query.search_path_1.sql - search_path_prefix = "aws" - search_path = "a,b,c" - severity = "high" -} \ No newline at end of file diff --git a/tests/acceptance/test_data/sample_workspace/cis_v130/section1.sp b/tests/acceptance/test_data/sample_workspace/cis_v130/section1.sp index e53f24565..7408c51dc 100644 --- a/tests/acceptance/test_data/sample_workspace/cis_v130/section1.sp +++ b/tests/acceptance/test_data/sample_workspace/cis_v130/section1.sp @@ -50,7 +50,6 @@ control "cis_v130_1_1" { sql = query.alarm.sql documentation = file("./cis_v130/docs/cis_v130_1_1.md") severity = "high" - search_path="a,b,c" tags = merge(local.cis_v130_1_common_tags, { cis_controls = "6.3" cis_item_id = "1.1" diff --git a/tests/acceptance/test_files/check.bats b/tests/acceptance/test_files/check.bats index 3cb9a56c7..bab5a4eb8 100644 --- a/tests/acceptance/test_files/check.bats +++ b/tests/acceptance/test_files/check.bats @@ -15,12 +15,12 @@ load "$LIB_BATS_SUPPORT/load.bash" cd - } -@test "steampipe check exitCode - with controls in alarm" { - cd $FUNCTIONALITY_TEST_MOD - run steampipe check benchmark.check_search_path_benchmark - assert_equal $status 1 - cd - -} +#@test "steampipe check exitCode - with controls in alarm" { +# cd $FUNCTIONALITY_TEST_MOD +# run steampipe check benchmark.check_search_path_benchmark +# assert_equal $status 1 +# cd - +#} @test "steampipe check exitCode - with controls in error(running multiple benchmarks together)" { cd $FUNCTIONALITY_TEST_MOD @@ -220,26 +220,26 @@ load "$LIB_BATS_SUPPORT/load.bash" ## check search_path tests -@test "steampipe check search_path_prefix when passed through command line" { - cd $FUNCTIONALITY_TEST_MOD - run steampipe check control.search_path_test_1 --output json --search-path-prefix aws --export test.json - assert_equal "$(cat test.json | jq '.controls[0].results[0].status')" '"ok"' - rm -f test.json -} +#@test "steampipe check search_path_prefix when passed through command line" { +# cd $FUNCTIONALITY_TEST_MOD +# run steampipe check control.search_path_test_1 --output json --search-path-prefix aws --export test.json +# assert_equal "$(cat test.json | jq '.controls[0].results[0].status')" '"ok"' +# rm -f test.json +#} -@test "steampipe check search_path when passed through command line" { - cd $FUNCTIONALITY_TEST_MOD - run steampipe check control.search_path_test_2 --output json --search-path chaos,b,c --export test.json - assert_equal "$(cat test.json | jq '.controls[0].results[0].status')" '"ok"' - rm -f test.json -} +#@test "steampipe check search_path when passed through command line" { +# cd $FUNCTIONALITY_TEST_MOD +# run steampipe check control.search_path_test_2 --output json --search-path chaos,b,c --export test.json +# assert_equal "$(cat test.json | jq '.controls[0].results[0].status')" '"ok"' +# rm -f test.json +#} -@test "steampipe check search_path and search_path_prefix when passed through command line" { - cd $FUNCTIONALITY_TEST_MOD - run steampipe check control.search_path_test_3 --output json --search-path chaos,b,c --search-path-prefix aws --export test.json - assert_equal "$(cat test.json | jq '.controls[0].results[0].status')" '"ok"' - rm -f test.json -} +#@test "steampipe check search_path and search_path_prefix when passed through command line" { +# cd $FUNCTIONALITY_TEST_MOD +# run steampipe check control.search_path_test_3 --output json --search-path chaos,b,c --search-path-prefix aws --export test.json +# assert_equal "$(cat test.json | jq '.controls[0].results[0].status')" '"ok"' +# rm -f test.json +#} diff --git a/tests/manual_testing/steampipe-mod-reports-poc/query.sp b/tests/manual_testing/steampipe-mod-reports-poc/query.sp index 2eebf83a5..9a20463aa 100644 --- a/tests/manual_testing/steampipe-mod-reports-poc/query.sp +++ b/tests/manual_testing/steampipe-mod-reports-poc/query.sp @@ -2,4 +2,4 @@ query "test" { sql = "select _ctx, account_aliases,arn from aws_account" search_path_prefix = "aws" -} \ No newline at end of file +}