Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a robot test to cover the case where mapper doesn't supply client cert #2504

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ Configuration snapshot fails when mapper does not supply client certificate
... external_id=${PARENT_SN}:device:${CHILD_SN}
[Teardown] Re-enable HTTP Client Certificate for Mapper

Configuration update succeeds despite mapper not supplying client certificate
Enable Certificate Authentication for File Transfer Service
Disable HTTP Client Certificate for Mapper
Update Configuration Should Succeed
... external_id=${PARENT_SN}:device:${CHILD_SN}
[Teardown] Re-enable HTTP Client Certificate for Mapper

*** Keywords ***
Get Configuration Should Succeed
[Arguments] ${device} ${external_id}
Expand All @@ -79,18 +86,27 @@ Get Configuration Should Succeed
Get Configuration Should Fail
[Arguments] ${failure_reason} ${device} ${external_id}
Cumulocity.Set Device ${external_id}
${operation}= Cumulocity.Get Configuration CONFIG1
${operation}= Cumulocity.Get Configuration tedge-configuration-plugin
reubenmiller marked this conversation as resolved.
Show resolved Hide resolved
Operation Should Be FAILED ${operation} failure_reason=${failure_reason} timeout=120

Update Configuration Should Fail
[Arguments] ${failure_reason} ${device} ${external_id}
Cumulocity.Set Device ${external_id}
Cumulocity.Should Support Configurations tedge-configuration-plugin /etc/tedge/tedge.toml system.toml CONFIG1 CONFIG1_BINARY
${config_url}= Cumulocity.Create Inventory Binary tedge-configuration-plugin tedge-configuration-plugin file=${CURDIR}/tedge-configuration-plugin-updated.toml
${operation}= Cumulocity.Set Configuration CONFIG1 ${config_url}
${operation}= Cumulocity.Set Configuration tedge-configuration-plugin ${config_url}
Operation Should Be FAILED ${operation} failure_reason=${failure_reason} timeout=120
Cumulocity.Should Support Configurations tedge-configuration-plugin /etc/tedge/tedge.toml system.toml CONFIG1 CONFIG1_BINARY

Update Configuration Should Succeed
[Arguments] ${external_id}
Cumulocity.Set Device ${external_id}
Cumulocity.Should Support Configurations tedge-configuration-plugin /etc/tedge/tedge.toml system.toml CONFIG1 CONFIG1_BINARY
${config_url}= Cumulocity.Create Inventory Binary tedge-configuration-plugin tedge-configuration-plugin file=${CURDIR}/tedge-configuration-plugin-updated.toml
${operation}= Cumulocity.Set Configuration tedge-configuration-plugin ${config_url}
Operation Should Be SUCCESSFUL ${operation} timeout=120
Cumulocity.Should Support Configurations tedge-configuration-plugin /etc/tedge/tedge.toml system.toml CONFIG1 Config@2.0.0

Enable Certificate Authentication for File Transfer Service
Set Device Context ${PARENT_SN}
Execute Command sudo tedge config set http.ca_path /etc/tedge/device-local-certs/roots
Expand Down