zammad-docker-compose/.github/tests.sh

40 lines
720 B
Bash
Raw Permalink Normal View History

#!/bin/bash
#
# run zammad tests
#
set -o errexit
set -o pipefail
docker-compose logs --timestamps --follow &
until (curl -I --silent --fail localhost | grep -iq "HTTP/1.1 200 OK"); do
echo "wait for zammad to be ready..."
sleep 15
done
sleep 30
echo
echo "Success - Zammad is up :)"
echo
2020-03-13 13:01:02 +00:00
echo
echo "Execute autowizard..."
echo
2020-03-13 13:01:02 +00:00
docker exec zammad-docker-compose_zammad-railsserver_1 rake zammad:setup:auto_wizard
echo
echo "Autowizard executed successful :)"
echo
2020-03-13 01:23:39 +00:00
echo
2020-03-13 13:01:02 +00:00
echo "Fill DB with some random data"
docker exec zammad-docker-compose_zammad-railsserver_1 rails r "FillDB.load(agents: 1,customers: 1,groups: 1,organizations: 1,overviews: 1,tickets: 1)"
echo
echo "DB fill successful :)"
echo