From 81b0fd5a7241673a56dfdb0b2b281a8887734f0e Mon Sep 17 00:00:00 2001 From: Rob Harrison Date: Fri, 28 Jun 2019 17:09:34 +0100 Subject: [PATCH] Fixed test --- mysql-backup-s3/integration-tests.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mysql-backup-s3/integration-tests.sh b/mysql-backup-s3/integration-tests.sh index 3aae150..fb45393 100644 --- a/mysql-backup-s3/integration-tests.sh +++ b/mysql-backup-s3/integration-tests.sh @@ -7,14 +7,17 @@ export MYSQL_HOST=123 export MYSQL_USER=123 export MYSQL_PASSWORD=123 -OUT=$(/bin/bash backup.sh) +OUT=$(/bin/bash backup.sh 2>&1) if [ "$?" == "0" ]; then echo "Backup exit code was 0" exit 1 fi -if [ "$OUT" == "" ]; then +EXPECTED="Creating dump for --all-databases from 123... +mysqldump: Got error: 2002: \"Can't connect to MySQL server on '123' (22)\" when trying to connect" + +if [ "$OUT" != "$EXPECTED" ]; then echo "OUTPUT was '$OUT'" exit 1 fi