forked from CMSgov/dpc-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dpcv2-portals-test.sh
executable file
·38 lines (32 loc) · 2.02 KB
/
dpcv2-portals-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
echo "┌───────────────────────┐"
echo "│ │"
echo "│ Running Impl & |"
echo "| AdminV2 Tests │"
echo "│ │"
echo "└───────────────────────┘"
# Build the container
make impl
make adminv2
# Prepare the environment
docker-compose -p start-v2-portals -f docker-compose.yml -f docker-compose.portals.yml up start_core_dependencies
docker-compose -p start-v2-portals -f docker-compose.yml -f docker-compose.portals.yml run --entrypoint "bundle exec rails db:create db:migrate RAILS_ENV=test" dpc_impl
# Run the tests
echo "┌──────────────────────────┐"
echo "│ │"
echo "│ Running DPC Impl Tests │"
echo "│ │"
echo "└──────────────────────────┘"
docker-compose -p start-v2-portals -f docker-compose.yml -f docker-compose.portals.yml run --entrypoint "bundle exec rails spec" dpc_impl
echo "┌─────────────────────────────┐"
echo "│ │"
echo "│ Running DPC AdminV2 Tests │"
echo "│ │"
echo "└─────────────────────────────┘"
docker-compose -p start-v2-portals -f docker-compose.yml -f docker-compose.portals.yml run --entrypoint "bundle exec rails spec" dpc_adminv2
echo "┌──────────────────────────────────────────┐"
echo "│ │"
echo "│ DPC v2 Impl & Admin Tests Complete │"
echo "│ │"
echo "└──────────────────────────────────────────┘"