Skip to content

Commit

Permalink
test: increase operation timeout
Browse files Browse the repository at this point in the history
c8y token can sometimes fail the first time which goes into a 60 second wait before retrying.

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
  • Loading branch information
reubenmiller committed Apr 24, 2023
1 parent 4f87e9c commit bd0e536
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ${DEFAULT_CONFIG} c8y-configuration-plugin
Set configuration when file exists
${config_url}= Cumulocity.Create Inventory Binary config1 CONFIG1 file=${CURDIR}/config1-version2.json
${operation}= Cumulocity.Set Configuration CONFIG1 url=${config_url}
${operation}= Operation Should Be SUCCESSFUL ${operation}
${operation}= Operation Should Be SUCCESSFUL ${operation} timeout=120
${target_contents}= Execute Command cat /etc/config1.json
Should Be Equal ${target_contents} {"name":"configuration1","version":2}
${FILE_MODE_OWNERSHIP}= Execute Command stat -c '%a %U:%G' /etc/config1.json strip=${True}
Expand All @@ -27,21 +27,21 @@ Set configuration when file does not exist
Execute Command rm -f /etc/config1.json
${config_url}= Cumulocity.Create Inventory Binary config1 CONFIG1 file=${CURDIR}/config1-version2.json
${operation}= Cumulocity.Set Configuration CONFIG1 url=${config_url}
${operation}= Operation Should Be SUCCESSFUL ${operation}
${operation}= Operation Should Be SUCCESSFUL ${operation} timeout=120
${target_contents}= Execute Command cat /etc/config1.json
Should Be Equal ${target_contents} {"name":"configuration1","version":2}
${FILE_MODE_OWNERSHIP}= Execute Command stat -c '%a %U:%G' /etc/config1.json strip=${True}
Should Be Equal ${FILE_MODE_OWNERSHIP} 640 tedge:tedge

Set configuration with broken url
${operation}= Cumulocity.Set Configuration CONFIG1 url=invalid://hellö.zip
${operation}= Operation Should Be FAILED ${operation}
${operation}= Operation Should Be FAILED ${operation} timeout=120
${target_contents}= Execute Command cat /etc/config1.json
Should Be Equal ${target_contents} {"name":"configuration1"}

Get configuration
${operation}= Cumulocity.Get Configuration CONFIG1
${operation}= Operation Should Be SUCCESSFUL ${operation}
${operation}= Operation Should Be SUCCESSFUL ${operation} timeout=120
${events}= Cumulocity.Device Should Have Event/s minimum=1 maximum=1 type=CONFIG1
${uploaded_contents}= Cumulocity.Event Should Have An Attachment ${events[0]["id"]}
${target_contents}= Execute Command cat /etc/config1.json
Expand Down

0 comments on commit bd0e536

Please sign in to comment.