summaryrefslogtreecommitdiffstats
path: root/cds-regression-test/test/cli/command-fail
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2021-01-19 12:32:04 -0500
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2021-01-20 10:02:39 -0500
commite92fce768cb792f11920f45fdbb38b3af69e212f (patch)
tree650d0bd49b1c98b49535d3f8aa9f98bb97255532 /cds-regression-test/test/cli/command-fail
parentbfffa2d982cc506979aaa0b96b6bb352c8dda9a7 (diff)
Update to latest version
Issue-ID: TEST-295 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: Ie14e2061c1e0931bf3d555e54c79bb736d140d5c
Diffstat (limited to 'cds-regression-test/test/cli/command-fail')
-rw-r--r--cds-regression-test/test/cli/command-fail/resources/elalto/expected-response.json27
-rw-r--r--cds-regression-test/test/cli/command-fail/resources/elalto/request-payload.json25
-rw-r--r--cds-regression-test/test/cli/command-fail/resources/frankfurt/expected-response.json34
-rw-r--r--cds-regression-test/test/cli/command-fail/resources/frankfurt/request-payload.json26
-rwxr-xr-xcds-regression-test/test/cli/command-fail/test.sh30
5 files changed, 0 insertions, 142 deletions
diff --git a/cds-regression-test/test/cli/command-fail/resources/elalto/expected-response.json b/cds-regression-test/test/cli/command-fail/resources/elalto/expected-response.json
deleted file mode 100644
index b7b29e2..0000000
--- a/cds-regression-test/test/cli/command-fail/resources/elalto/expected-response.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "commonHeader": {
- "timestamp": "2020-02-11T21:24:35.215Z",
- "originatorId": "System",
- "requestId": "regression-test-cli-command-fail",
- "subRequestId": "1",
- "flags": null
- },
- "actionIdentifiers": {
- "blueprintName": "RT-cli",
- "blueprintVersion": "1.0.0",
- "actionName": "cli",
- "mode": "sync"
- },
- "status": {
- "code": 500,
- "eventType": "EVENT_COMPONENT_FAILURE",
- "timestamp": "2020-02-11T21:24:36.824Z",
- "errorMessage": "Failed to execute commands, below the output : \nCommand : nonExistCommand",
- "message": "failure"
- },
- "payload": {
- "cli-response": {
- "response-data": "Error"
- }
- }
-}
diff --git a/cds-regression-test/test/cli/command-fail/resources/elalto/request-payload.json b/cds-regression-test/test/cli/command-fail/resources/elalto/request-payload.json
deleted file mode 100644
index db861c9..0000000
--- a/cds-regression-test/test/cli/command-fail/resources/elalto/request-payload.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "actionIdentifiers": {
- "mode": "sync",
- "blueprintName": "RT-cli",
- "blueprintVersion": "1.0.0",
- "actionName": "cli"
- },
- "payload": {
- "cli-request": {
- "host": "cds-regression-sshmock",
- "username": "cdstest",
- "password": "testcds",
- "port": "22",
- "connectionTimeOut": "5000",
- "commands": [
- "nonExistCommand"
- ]
- }
- },
- "commonHeader": {
- "subRequestId": "1",
- "requestId": "regression-test-cli-command-fail",
- "originatorId": "System"
- }
-}
diff --git a/cds-regression-test/test/cli/command-fail/resources/frankfurt/expected-response.json b/cds-regression-test/test/cli/command-fail/resources/frankfurt/expected-response.json
deleted file mode 100644
index 6b71773..0000000
--- a/cds-regression-test/test/cli/command-fail/resources/frankfurt/expected-response.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "correlationUUID": null,
- "commonHeader": {
- "timestamp": "2020-06-04T15:05:20.003Z",
- "originatorId": "System",
- "requestId": "regression-test-cli-command-fail",
- "subRequestId": "1",
- "flags": null
- },
- "actionIdentifiers": {
- "blueprintName": "RT-cli",
- "blueprintVersion": "1.0.0",
- "actionName": "cli",
- "mode": "sync"
- },
- "status": {
- "code": 200,
- "eventType": "EVENT_COMPONENT_EXECUTED",
- "timestamp": "2020-06-04T15:05:41.528Z",
- "errorMessage": null,
- "message": "success"
- },
- "payload": {
- "cli-response": {
- "response-data": [
- {
- "command": "nonExistCommand",
- "deviceOutput": "nonExistCommand\r\n/ $ nonExistCommand\r\n-ash: nonExistCommand: not found\r\n/ $ \u001b[6n",
- "successful": true
- }
- ]
- }
- }
-}
diff --git a/cds-regression-test/test/cli/command-fail/resources/frankfurt/request-payload.json b/cds-regression-test/test/cli/command-fail/resources/frankfurt/request-payload.json
deleted file mode 100644
index 700271e..0000000
--- a/cds-regression-test/test/cli/command-fail/resources/frankfurt/request-payload.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "actionIdentifiers": {
- "mode": "sync",
- "blueprintName": "RT-cli",
- "blueprintVersion": "1.0.0",
- "actionName": "cli"
- },
- "payload": {
- "cli-request": {
- "host": "cds-regression-sshmock",
- "username": "cdstest",
- "password": "testcds",
- "port": "22",
- "connectionTimeOut": "5000",
- "logging": true,
- "commands": [
- "nonExistCommand"
- ]
- }
- },
- "commonHeader": {
- "subRequestId": "1",
- "requestId": "regression-test-cli-command-fail",
- "originatorId": "System"
- }
-}
diff --git a/cds-regression-test/test/cli/command-fail/test.sh b/cds-regression-test/test/cli/command-fail/test.sh
deleted file mode 100755
index a150680..0000000
--- a/cds-regression-test/test/cli/command-fail/test.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-CBA_NAME="cli"
-TEST_NAME="command-fail"
-TEST_NUMBER=$RANDOM
-
-mkdir -p "$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/"
-RESPONSE_HEADERS_FILE="$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/response-headers"
-RESPONSE_PAYLOAD_FILE="$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/response-payload"
-
-RESOURCES_DIR="$TEST_DIRECTORY/$CBA_NAME/$TEST_NAME/resources/$CDS_VERSION"
-REQUEST_PAYLOAD_FILE="$RESOURCES_DIR/request-payload.json"
-EXPECTED_PAYLOAD_FILE="$RESOURCES_DIR/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
-
-if [ "${CDS_VERSION} " == "elalto " ]; then
- echo 'Assert statuscode 500'
- assert_status_code 500 $RESPONSE_HEADERS_FILE
-else
- echo 'Assert statuscode 200'
- assert_status_code 200 $RESPONSE_HEADERS_FILE
-fi
-
-echo 'Assert payload'
-assert_cds_response_equals $EXPECTED_PAYLOAD_FILE $RESPONSE_PAYLOAD_FILE