Skip to content

Commit

Permalink
Import interface after closing database (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonRomano authored Jul 21, 2016
1 parent be8ab98 commit ee551ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/sql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ Sql__open() {
# Shuts down the database
#################################################
Sql__close() {
. "$Sql__PACKAGE_LOCATION/lib/drivers/interface.sh"
Sql_driver_close
}
8 changes: 8 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ Sql_test_generic_open() {
echo "'Sql__close' returned an error"
return 1
fi

# Test connection
local ping_output
ping_output=$(Sql__ping)
if [[ $? -eq 0 ]]; then
echo "Database not closed properly, can still ping the database after closing"
return 1
fi
}

#################################################
Expand Down

0 comments on commit ee551ec

Please sign in to comment.