diff --git a/tests/RobotFramework/requirements/requirements.txt b/tests/RobotFramework/requirements/requirements.txt index 56780215114..f50d06ea885 100644 --- a/tests/RobotFramework/requirements/requirements.txt +++ b/tests/RobotFramework/requirements/requirements.txt @@ -2,7 +2,7 @@ dateparser~=1.2.0 paho-mqtt~=1.6.1 python-dotenv~=1.0.0 robotframework~=7.0.0 -robotframework-c8y @ git+https://github.com/thin-edge/robotframework-c8y.git@0.37.2 +robotframework-c8y @ git+https://github.com/thin-edge/robotframework-c8y.git@0.38.1 robotframework-aws @ git+https://github.com/thin-edge/robotframework-aws.git@0.0.9 robotframework-debuglibrary~=2.5.0 robotframework-jsonlibrary~=0.5 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