This repository has been archived by the owner on Apr 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
metadataTest.sh
executable file
·93 lines (62 loc) · 4.2 KB
/
metadataTest.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
NAMESFILE=$(dirname "$0")/files.sh
COLLECTION_PATH="collections/core-metadata.postman_collection.json"
ENV_PATH="environment/core-metadata${ENV_SUFFIX}.postman_environment.json"
if [ -f $NAMESFILE ]; then
. $NAMESFILE
else
echo "Error: Names file does not exist."
exit $?
fi
echo "Info: Initiating Metadata Test."
echo "[info] ---------- use docker-compose run newman ----------"
echo "[info] ======================== Start run metaData test - addressable ========================"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="addressable" --iteration-data="data/addressableData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="addressable_error_4xx" --iteration-data="data/addressableData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
echo "[info] ======================== Start run metaData test - command ========================"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="command" --iteration-data="data/commandData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="command_error_4xx" --iteration-data="data/commandData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
echo "[info] ======================== Start run metaData test - device ========================"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="device" --iteration-data="data/deviceData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="device_error_4xx" --iteration-data="data/deviceData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
echo "[info] ======================== Start run metaData test - deviceprofile ========================"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="deviceprofile" --iteration-data="data/deviceProfileData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="deviceprofile_error_4xx" --iteration-data="data/deviceProfileData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
echo "[info] ======================== Start run metaData test - devicereport ========================"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="devicereport" --iteration-data="data/deviceReportData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="devicereport_error_4xx" --iteration-data="data/deviceReportData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
echo "[info] ======================== Start run metaData test - deviceservice ========================"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="deviceservice" --iteration-data="data/deviceServiceData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="deviceservice_error_4xx" --iteration-data="data/deviceServiceData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
echo "[info] ======================== Start run metaData test - provisionwatcher ========================"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="provisionwatcher" --iteration-data="data/provisionWatcherData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
docker-compose -f ${docker_compose_test_tools} run --rm postman run ${COLLECTION_PATH} \
--folder="provisionwatcher_error_4xx" --iteration-data="data/provisionWatcherData.json" --environment=${ENV_PATH} \
--reporters="junit,cli"
echo "Info: Metadata Test completed."