Skip to content

Commit

Permalink
Fail t3c int tests if migrations fail, and print migration output (#7778
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zrhoffman committed Sep 6, 2023
1 parent 97f17d1 commit e9b559b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cache-config/testing/docker/traffic_ops/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,18 @@ while ! nc $DB_SERVER $DB_PORT </dev/null; do
fi
done

(
set -o errexit
# create the 'traffic_ops' database, tables and runs migrations
mkdir -p /var/log/traffic_ops/
touch /var/log/traffic_ops/to_admin.log /var/log/traffic_ops/tv_admin.log
tail -f /var/log/traffic_ops/to_admin.log /var/log/traffic_ops/tv_admin.log &
cd /opt/traffic_ops/app && db/admin --env=production reset >> /var/log/traffic_ops/to_admin.log 2>&1
cd /opt/traffic_ops/app && db/admin --trafficvault --env=production reset >> /var/log/traffic_ops/tv_admin.log 2>&1
) || {
echo Failed to run migrations
exit 1
}

# start traffic_ops
start

0 comments on commit e9b559b

Please sign in to comment.