Skip to content

Commit

Permalink
tests: update libraries and use new software type syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
  • Loading branch information
reubenmiller committed Feb 7, 2024
1 parent 967f720 commit defa501
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions tests/alpine-s6/children/operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ It Should List the Installed Software
Device Should Have Installed Software tedge tedge-agent

Install software (apk package)
${operation}= Install Software jq,latest::apk
${operation}= Install Software {"name": "jq", "version": "latest", "softwareType": "apk"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Have Installed Software jq
Device Should Have Installed Software {"name": "jq", "softwareType": "apk"}

Uninstall software (apk package)
${operation}= Uninstall Software jq,latest::apk
${operation}= Uninstall Software {"name": "jq", "version": "latest", "softwareType": "apk"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Not Have Installed Software jq
Device Should Not Have Installed Software {"name": "jq", "softwareType": "apk"}

*** Keywords ***

Expand Down
4 changes: 2 additions & 2 deletions tests/debian-systemd/main/operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Restart device
Cumulocity.Device Should Have Event/s expected_text=tedge started up.+ minimum=1 maximum=1 type=startup after=${date_from}

Install software package
${operation}= Cumulocity.Install Software vim-tiny,latest::apt
${operation}= Cumulocity.Install Software {"name": "vim-tiny", "version": "latest", "softwareType": "apt"}
Operation Should Be SUCCESSFUL ${operation} timeout=90
Cumulocity.Device Should Have Installed Software vim-tiny

Uninstall software package
${operation}= Cumulocity.Uninstall Software vim-tiny,::apt timeout=90
${operation}= Cumulocity.Uninstall Software {"name": "vim-tiny", "softwareType": "apt"} timeout=90
Operation Should Be SUCCESSFUL ${operation}
Cumulocity.Device Should Not Have Installed Software vim-tiny

Expand Down
4 changes: 2 additions & 2 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
robotframework~=6.0.0
robotframework-c8y @ git+https://github.com/reubenmiller/robotframework-c8y.git@0.26.0
robotframework-devicelibrary[docker] @ git+https://github.com/reubenmiller/robotframework-devicelibrary.git@1.10.2
robotframework-c8y @ git+https://github.com/reubenmiller/robotframework-c8y.git@0.31.3
robotframework-devicelibrary[docker] @ git+https://github.com/reubenmiller/robotframework-devicelibrary.git@1.13.0
12 changes: 6 additions & 6 deletions tests/tedge-containermgmt/operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ Get Configuration

Install container-group package
${binary_url}= Cumulocity.Create Inventory Binary nginx container-group file=${CURDIR}/data/docker-compose.nginx.yaml
${operation}= Cumulocity.Install Software nginx,1.0.0::container-group,${binary_url}
${operation}= Cumulocity.Install Software {"name": "nginx", "version": "1.0.0", "softwareType": "container-group", "url": "${binary_url}"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Have Installed Software nginx,1.0.0
Device Should Have Installed Software {"name": "nginx", "version": "1.0.0", "softwareType": "container-group"}
${operation}= Cumulocity.Execute Shell Command wget -O- nginx:80
Operation Should Be SUCCESSFUL ${operation}
Should Contain ${operation.to_json()["c8y_Command"]["result"]} Welcome to nginx

Uninstall container-group
${operation}= Cumulocity.Uninstall Software nginx,1.0.0::container-group
${operation}= Cumulocity.Uninstall Software {"name": "nginx", "version": "1.0.0", "softwareType": "container-group"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Not Have Installed Software nginx

Install container package
${operation}= Cumulocity.Install Software webserver,httpd:2.4::container
${operation}= Cumulocity.Install Software {"name": "webserver", "version": "httpd:2.4", "softwareType": "container"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Have Installed Software webserver,httpd:2.4
Device Should Have Installed Software {"name": "webserver", "version": "httpd:2.4", "softwareType": "container"}
${operation}= Cumulocity.Execute Shell Command wget -O- webserver:80
Operation Should Be SUCCESSFUL ${operation}
Should Contain ${operation.to_json()["c8y_Command"]["result"]} It works!

Uninstall container package
${operation}= Cumulocity.Uninstall Software webserver,httpd:2.4::container
${operation}= Cumulocity.Uninstall Software {"name": "webserver", "version": "httpd:2.4", "softwareType": "container"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Not Have Installed Software webserver

Expand Down
4 changes: 2 additions & 2 deletions tests/tedge/operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ Check Software List
Install software
[Arguments] ${device}
Cumulocity.Set Device ${device}
${operation}= Cumulocity.Install Software jq,latest::apk
${operation}= Cumulocity.Install Software {"name": "jq", "version": "latest", "softwareType": "apk"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Have Installed Software jq

Uninstall software
[Arguments] ${device}
Cumulocity.Set Device ${device}
${operation}= Cumulocity.Uninstall Software jq,latest::apk
${operation}= Cumulocity.Uninstall Software {"name": "jq", "version": "latest", "softwareType": "apk"}
Operation Should Be SUCCESSFUL ${operation}
Device Should Not Have Installed Software jq

Expand Down

0 comments on commit defa501

Please sign in to comment.