Ian Fijolek
28f081c8d0
All checks were successful
continuous-integration/drone/push Build is passing
Including databases
16 lines
412 B
Bash
Executable File
16 lines
412 B
Bash
Executable File
#! /bin/sh
|
|
set -ex
|
|
|
|
# Check flat file
|
|
test -f /data/test.txt
|
|
grep "^Hello" /data/test.txt
|
|
|
|
# Check Sqlite database
|
|
test -f /data/test_database.db
|
|
sqlite3 /data/test_database.db "select data from test_table where id = 1" | grep "^Test row"
|
|
|
|
# Check MySql database
|
|
mysql --host "$MYSQL_HOST" --user "$MYSQL_USER" --password="$MYSQL_PWD" main <<-EOF | grep "^Test row"
|
|
select data from test_table where id = 1;
|
|
EOF
|