/usr/lib/obs/tests/appliance/0090-check_database.ts is in obs-server 2.7.1-10.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!/bin/bash
export BASH_TAP_ROOT=$(dirname $0)
. $(dirname $0)/bash-tap-bootstrap
plan tests 2
DB_NAME=api_production
DB_EXISTS=$(mysql -e "show databases"|grep $DB_NAME)
is "$DB_EXISTS" "$DB_NAME" "Checking if database exists"
TABLES_IN_DB=$(mysql -e "show tables" $DB_NAME)
[[ $TABLES_IN_DB ]]
is "$?" 0 "Checking if tables in database $DB_NAME"
|