From 5d218ec63f9ca1a2e7847dab900fb32131c1165a Mon Sep 17 00:00:00 2001 From: James Rhodes Date: Mon, 22 Jul 2024 12:35:35 +0100 Subject: [PATCH] Add test to verify remote access works with a custom root cert path Signed-off-by: James Rhodes --- ..._remote_access_custom_root_cert_path.robot | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/RobotFramework/tests/cumulocity/remote-access/test_remote_access_custom_root_cert_path.robot diff --git a/tests/RobotFramework/tests/cumulocity/remote-access/test_remote_access_custom_root_cert_path.robot b/tests/RobotFramework/tests/cumulocity/remote-access/test_remote_access_custom_root_cert_path.robot new file mode 100644 index 00000000000..513ad6b3f20 --- /dev/null +++ b/tests/RobotFramework/tests/cumulocity/remote-access/test_remote_access_custom_root_cert_path.robot @@ -0,0 +1,27 @@ +*** Settings *** +Resource ../../../resources/common.resource +Library Cumulocity +Library ThinEdgeIO + +Test Tags theme:c8y theme:troubleshooting theme:plugins adapter:docker +Test Setup Custom Setup +Test Teardown Get Logs + +*** Test Cases *** + +Execute ssh command with a custom root certificate path + ${KEY_FILE}= Configure SSH + Add Remote Access Passthrough Configuration + ${stdout}= Execute Remote Access Command command=tedge --version exp_exit_code=0 user=root key_file=${KEY_FILE} + Should Match Regexp ${stdout} tedge .+ + +*** Keywords *** + +Custom Setup + ${DEVICE_SN}= Setup + Set Suite Variable $DEVICE_SN + Device Should Exist ${DEVICE_SN} + Enable Service ssh + Start Service ssh + Execute Command mv /etc/ssl/certs /etc/ssl/moved-certs + Execute Command tedge config set c8y.root_cert_path /etc/ssl/moved-certs