Updated tests PMS persistency
[nonrtric.git] / test / http-https-proxy / basic_test.sh
1 #!/bin/bash
2
3 #  ============LICENSE_START===============================================
4 #  Copyright (C) 2021 Nordix Foundation. All rights reserved.
5 #  ========================================================================
6 #  Licensed under the Apache License, Version 2.0 (the "License");
7 #  you may not use this file except in compliance with the License.
8 #  You may obtain a copy of the License at
9 #
10 #       http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #  Unless required by applicable law or agreed to in writing, software
13 #  distributed under the License is distributed on an "AS IS" BASIS,
14 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #  See the License for the specific language governing permissions and
16 #  limitations under the License.
17 #  ============LICENSE_END=================================================
18 #
19
20 # Automated test script for callback receiver container
21
22
23 echo "NOTE - No automatic response check - check manually"
24 echo "All call shall return a json struct"
25 echo ""
26
27 CMD="curl --proxy localhost:8080 localhost:8081"
28 echo "Running cmd: "$CMD
29 $CMD
30 echo ""
31 if [ $? -eq 0 ]; then
32     echo "CMD OK"
33 else
34     echo "CMD FAIL"
35 fi
36 echo ""
37
38 CMD="curl --proxy localhost:8080 -k https://localhost:8434"
39 echo "Running cmd: "$CMD
40 $CMD
41 echo ""
42 if [ $? -eq 0 ]; then
43     echo "CMD OK"
44 else
45     echo "CMD FAIL"
46 fi
47 echo ""
48
49 CMD="curl --proxy-insecure localhost:8433 localhost:8081"
50 echo "Running cmd: "$CMD
51 $CMD
52 echo ""
53 if [ $? -eq 0 ]; then
54     echo "CMD OK"
55 else
56     echo "CMD FAIL"
57 fi
58 echo ""
59
60 CMD="curl --proxy-insecure localhost:8433 -k https://localhost:8434"
61 echo "Running cmd: "$CMD
62 $CMD
63 echo ""
64 if [ $? -eq 0 ]; then
65     echo "CMD OK"
66 else
67     echo "CMD FAIL"
68 fi
69 echo ""
70
71 echo "DONE"