blob: d30e5abb80f18a65da7dee358075db938d426099 (
plain)
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
|
#!/bin/bash
CBA_NAME="netconf"
LANG="kotlin"
TEST_NAME="connect-fail"
TEST_NUMBER=$RANDOM
mkdir -p "$RESPONSES_DIRECTORY/$CBA_NAME/$LANG/$TEST_NAME/$TEST_NUMBER/"
RESPONSE_HEADERS_FILE="$RESPONSES_DIRECTORY/$CBA_NAME/$LANG/$TEST_NAME/$TEST_NUMBER/response-headers"
RESPONSE_PAYLOAD_FILE="$RESPONSES_DIRECTORY/$CBA_NAME/$LANG/$TEST_NAME/$TEST_NUMBER/response-payload"
REQUEST_PAYLOAD_FILE="$TEST_DIRECTORY/$CBA_NAME/$LANG/$TEST_NAME/request-payload.json"
EXPECTED_PAYLOAD_FILE="$TEST_DIRECTORY/$CBA_NAME/$LANG/$TEST_NAME/expected-response.json"
. ./$TEST_DIRECTORY/utils.sh
echo "Running test: $CBA_NAME:$TEST_NUMBER:$TEST_NAME"
echo 'Calling CDS process'
process_cba $REQUEST_PAYLOAD_FILE $RESPONSE_PAYLOAD_FILE $RESPONSE_HEADERS_FILE
echo 'Assert statuscode 500'
assert_status_code 500 $RESPONSE_HEADERS_FILE
echo 'Assert connect fail payload'
assert_cds_response_equals $EXPECTED_PAYLOAD_FILE $RESPONSE_PAYLOAD_FILE
|