generated from MLH-Fellowship/sre-portfolio-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prod-test.sh
23 lines (17 loc) · 1.14 KB
/
prod-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
#!/bin/bash
indexres=$(curl -f -s 'http://davidjiang.cloud' && echo "Test #1: Index page success" || echo "Test #1: Index page failed to load" )
indexres=$(echo $indexres | sed 's/^.*Test #/Test #/')
echo $indexres
healthres=$(curl -f -s 'http://davidjiang.cloud/health' && echo "Test #2: Health page success" || echo "Test #2: Health page failed to load" )
healthres=$(echo $healthres | sed 's/^.*Test #/Test #/')
echo $healthres
healthres=$(curl -f -s 'http://davidjiang.cloud/login' && echo "Test #3: Login page success" || echo "Test #3: Login page failed to load" )
healthres=$(echo $healthres | sed 's/^.*Test #/Test #/')
echo $healthres
healthres=$(curl -f -s -d "username=testing&password=testing" 'http://davidjiang.cloud/login' && echo "Test #4: Login with user success" || echo "Test #4: Login with user failed" )
healthres=$(echo $healthres | sed 's/^.*Test #/Test #/')
echo $healthres
healthres=$(curl -f -s 'http://davidjiang.cloud/register' && echo "Test #5: Register page success" || echo "Test #4: Register page failed to load" )
healthres=$(echo $healthres | sed 's/^.*Test #/Test #/')
echo $healthres
curl -f -s 'http://davidjiang.cloud/error'