From 4911dbfe5fdd24c20b51e9c50b576417530eabbb Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Tue, 3 Dec 2024 23:56:19 +0100 Subject: [PATCH] add on demand system test (not run by default in ci) --- .../registration/cumulocity_ca.robot | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/RobotFramework/tests/cumulocity/registration/cumulocity_ca.robot diff --git a/tests/RobotFramework/tests/cumulocity/registration/cumulocity_ca.robot b/tests/RobotFramework/tests/cumulocity/registration/cumulocity_ca.robot new file mode 100644 index 00000000000..fe53caa6075 --- /dev/null +++ b/tests/RobotFramework/tests/cumulocity/registration/cumulocity_ca.robot @@ -0,0 +1,31 @@ +*** Settings *** +Resource ../../../../resources/common.resource +Library Cumulocity +Library ThinEdgeIO +Library String + +Test Setup Custom Setup + +Test Tags theme:c8y test:on_demand + + +*** Test Cases *** +Register Device Using Cumulocity CA + ${credentials}= Bulk Register Device With Cumulocity CA ${DEVICE_SN} + ${DOMAIN}= Get Cumulocity Domain + Execute Command tedge config set c8y.url "${DOMAIN}" + Execute Command tedge cert download c8y --device-id "${DEVICE_SN}" --token "${credentials.password}" + Execute Command tedge connect c8y + + +*** Keywords *** +Get Cumulocity Domain + ${DOMAIN}= Replace String Using Regexp ${C8Y_CONFIG.host} ^.*:// ${EMPTY} + ${DOMAIN}= Strip String ${DOMAIN} characters=/ + RETURN ${DOMAIN} + +Custom Setup + ${DEVICE_SN}= Setup skip_bootstrap=${True} + Execute Command test -f ./bootstrap.sh && ./bootstrap.sh --no-bootstrap --no-connect || true + + Set Test Variable $DEVICE_SN