github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/tests/acceptance/test_files/blank_aggregators.bats (about) 1 load "$LIB_BATS_ASSERT/load.bash" 2 load "$LIB_BATS_SUPPORT/load.bash" 3 4 # function setup() { 5 # rm -f $STEAMPIPE_INSTALL_DIR/config/chaos.spc 6 # steampipe service "select 1" 7 # } 8 9 @test "blank aggregator connection should throw a warning but not fail to run steampipe" { 10 skip 11 cp $SRC_DATA_DIR/blank_aggregator.spc $STEAMPIPE_INSTALL_DIR/config/chaos.spc 12 run steampipe query "select * from all_chaos.chaos_all_numeric_column" 13 echo $output 14 assert_output --partial "aggregator 'all_chaos' with pattern '*' matches no connections" 15 } 16 17 @test "blank aggregator connection should return empty results and not error" { 18 skip 19 cp $SRC_DATA_DIR/blank_aggregator.spc $STEAMPIPE_INSTALL_DIR/config/chaos.spc 20 run steampipe query "select * from all_chaos.chaos_all_numeric_column" 21 echo $output 22 assert_equal "$output" "null" 23 } 24 25 @test "blank aggregator connection schema not created issue" { 26 skip 27 # for blank aggregator connections, schema was not getting created while service was running 28 # https://github.com/turbot/steampipe/issues/3488 29 run steampipe service start 30 cp $SRC_DATA_DIR/blank_aggregator.spc $STEAMPIPE_INSTALL_DIR/config/chaos.spc 31 run steampipe query "select * from all_chaos.chaos_all_numeric_column" 32 echo $output 33 steampipe service stop 34 assert_equal "$output" "null" 35 } 36 37 function teardown_file() { 38 # list running processes 39 ps -ef | grep steampipe 40 41 # check if any processes are running 42 num=$(ps aux | grep steampipe | grep -v bats | grep -v grep | grep -v tests/acceptance | wc -l | tr -d ' ') 43 assert_equal $num 0 44 }