BjornMagnussonXA | a549157 | 2021-05-04 09:21:24 +0200 | [diff] [blame] | 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" |
BjornMagnussonXA | 674793d | 2021-05-06 19:49:17 +0200 | [diff] [blame] | 35 | exti 1 |
BjornMagnussonXA | a549157 | 2021-05-04 09:21:24 +0200 | [diff] [blame] | 36 | fi |
| 37 | echo "" |
| 38 | |
| 39 | CMD="curl --proxy localhost:8080 -k https://localhost:8434" |
| 40 | echo "Running cmd: "$CMD |
| 41 | $CMD |
| 42 | echo "" |
| 43 | if [ $? -eq 0 ]; then |
| 44 | echo "CMD OK" |
| 45 | else |
| 46 | echo "CMD FAIL" |
BjornMagnussonXA | 674793d | 2021-05-06 19:49:17 +0200 | [diff] [blame] | 47 | exti 1 |
BjornMagnussonXA | a549157 | 2021-05-04 09:21:24 +0200 | [diff] [blame] | 48 | fi |
| 49 | echo "" |
| 50 | |
BjornMagnussonXA | 674793d | 2021-05-06 19:49:17 +0200 | [diff] [blame] | 51 | CMD="curl --proxy-insecure --proxy https://localhost:8433 localhost:8081" |
BjornMagnussonXA | a549157 | 2021-05-04 09:21:24 +0200 | [diff] [blame] | 52 | echo "Running cmd: "$CMD |
| 53 | $CMD |
| 54 | echo "" |
| 55 | if [ $? -eq 0 ]; then |
| 56 | echo "CMD OK" |
| 57 | else |
| 58 | echo "CMD FAIL" |
BjornMagnussonXA | 674793d | 2021-05-06 19:49:17 +0200 | [diff] [blame] | 59 | exti 1 |
BjornMagnussonXA | a549157 | 2021-05-04 09:21:24 +0200 | [diff] [blame] | 60 | fi |
| 61 | echo "" |
| 62 | |
BjornMagnussonXA | 674793d | 2021-05-06 19:49:17 +0200 | [diff] [blame] | 63 | CMD="curl --proxy-insecure --proxy https://localhost:8433 -k https://localhost:8434" |
BjornMagnussonXA | a549157 | 2021-05-04 09:21:24 +0200 | [diff] [blame] | 64 | echo "Running cmd: "$CMD |
| 65 | $CMD |
| 66 | echo "" |
| 67 | if [ $? -eq 0 ]; then |
| 68 | echo "CMD OK" |
| 69 | else |
| 70 | echo "CMD FAIL" |
BjornMagnussonXA | 674793d | 2021-05-06 19:49:17 +0200 | [diff] [blame] | 71 | exti 1 |
BjornMagnussonXA | a549157 | 2021-05-04 09:21:24 +0200 | [diff] [blame] | 72 | fi |
| 73 | echo "" |
| 74 | |
| 75 | echo "DONE" |