blob: c0af24e03895d56efe6b53555f923bdac939ae2a [file] [log] [blame]
BjornMagnussonXAf38e1e82020-10-11 23:05:02 +02001#!/bin/bash
2
3# ============LICENSE_START===============================================
4# Copyright (C) 2020 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 producer stub container
21
22if [ $# -ne 1 ]; then
23 echo "Usage: ./basic_test.sh nonsecure|secure"
24 exit 1
25fi
26if [ "$1" != "nonsecure" ] && [ "$1" != "secure" ]; then
27 echo "Usage: ./basic_test.sh nonsecure|secure"
28 exit 1
29fi
30
31if [ $1 == "nonsecure" ]; then
32 #Default http port for the simulator
33 PORT=8092
34 # Set http protocol
35 HTTPX="http"
36else
37 #Default https port for the simulator
38 PORT=8093
39 # Set https protocol
40 HTTPX="https"
41fi
42
43# source function to do curl and check result
44. ../common/do_curl_function.sh
45
46echo "=== hello world ==="
47RESULT="OK"
48do_curl GET / 200
49
50
51
52echo "********************"
53echo "*** All tests ok ***"
54echo "********************"