github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/tests/acceptance/run-local.sh (about) 1 #!/bin/bash -e 2 3 MY_PATH="`dirname \"$0\"`" # relative 4 MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized 5 6 export STEAMPIPE_INSTALL_DIR=$(mktemp -d) 7 export TIME_TO_QUERY=3 # overriding since it takes more than 2secs to run locally 8 export TZ=UTC 9 export WD=$(mktemp -d) 10 11 trap "cd -;code=$?;rm -rf $STEAMPIPE_INSTALL_DIR; exit $code" EXIT 12 13 cd $WD 14 echo "Working directory: $WD" 15 # setup a steampipe installation 16 echo "Install directory: $STEAMPIPE_INSTALL_DIR" 17 steampipe query "select 1 as setup_complete" 18 echo "Installation complete at $STEAMPIPE_INSTALL_DIR" 19 echo "Installing CHAOS and CHAOSDYNAMIC" 20 steampipe plugin install chaos chaosdynamic --progress=false 21 echo "Installed CHAOS and CHAOSDYNAMIC" 22 23 if [ $# -eq 0 ]; then 24 # Run all test files 25 $MY_PATH/run.sh 26 else 27 $MY_PATH/run.sh ${1} 28 fi