-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·51 lines (39 loc) · 1.02 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
export DB_DUMP_HOST=10.10.0.1
export DB_DUMP_PORT=5444
export DB_DUMP_USER=root
export DB_DUMP_PASS=123som34andomP4ss
export DB_DUMP_NAME=dumper
export DB_DUMP_FILE_NAME=some_dump
export AWS_BUCKET_NAME=backups
export AWS_END_POINT=http://some.url.dom
source ./init.sh
parseEnv
if [ ${HOST} != "10.10.0.1" ]; then
echo "Invalid host name" && exit 1
fi
if [ ${PORT} != "5444" ]; then
echo "Invalid port" && exit 1
fi
if [ ${USER} != "root" ]; then
echo "Invalid user" && exit 1
fi
if [ ${PASS} != "123som34andomP4ss" ]; then
echo "Invalid password" && exit 1
fi
if [ ${NAME} != "dumper" ]; then
echo "Invalid DB name" && exit 1
fi
if [ ${FILE_NAME} != "some_dump" ]; then
echo "Invalid file name" && exit 1
fi
if [ ${DUMP_PATH} != "/dumps/some_dump" ]; then
echo "Invalid local file path" && exit 1
fi
if [ ${BUCKET} != "backups" ]; then
echo "Invalid bucket name" && exit 1
fi
if [ ${ENDPOINT} != "http://some.url.dom" ]; then
echo "Invalid AWS endpoint" && exit 1
fi
echo "End of tests! (SUCCESS)"