-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update manager robot test * Tune up tests * Containers sequence changed * Tuning UM test
- Loading branch information
Showing
6 changed files
with
508 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
resources/docker-snapshot/dockerfiles/leda-tests/40__update_manager.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
# * | ||
# * See the NOTICE file(s) distributed with this work for additional | ||
# * information regarding copyright ownership. | ||
# * | ||
# * This program and the accompanying materials are made available under the | ||
# * terms of the Apache License 2.0 which is available at | ||
# * https://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * SPDX-License-Identifier: Apache-2.0 | ||
# ********************************************************************************/ | ||
|
||
*** Settings *** | ||
Documentation Update Manager ${leda.target} | ||
Resource leda_keywords.resource | ||
|
||
Library OperatingSystem | ||
Library Process | ||
|
||
Test Timeout 10 minutes | ||
|
||
*** Variables *** | ||
|
||
${sua_alive_regex} ([.\\s\\S]*)("self-update-agent")([\\s\\S.]*) | ||
${topic_pub_currentstate} selfupdate/currentstate/get | ||
${topic_sub_currentstate} selfupdate/currentstate | ||
${get_state_filename} robot-resources/get_state.json | ||
|
||
${topic_pub_desiredstate} vehicleupdate/desiredstate | ||
${desired_state_no_containers_filename} robot-resources/desired-state-no-containers.json | ||
${desired_state_filename} robot-resources/desired-state.json | ||
@{containers} sua feedercan seatservice-example databroker hvacservice-example | ||
@{any_state_containers} cloudconnector | ||
@{stop_containers} seatservice-example databroker feedercan hvacservice-example | ||
|
||
*** Test Cases *** | ||
|
||
Check containers running | ||
[Documentation] Check containers running | ||
Wait Until Keyword Succeeds 5m 3s Verify SUA is alive ${broker.uri} ${broker.port} ${topic_pub_currentstate} ${topic_sub_currentstate} ${get_state_filename} ${sua_alive_regex} | ||
${result}= Check containers status ${broker.uri} ${broker.port} Running @{containers} | ||
Should Be Empty ${result} msg=Container(s) ${result} must be Running | ||
${result}= Check containers status ${broker.uri} ${broker.port} Any @{any_state_containers} | ||
Should Be Empty ${result} msg=Container(s) ${result} must persist | ||
|
||
Stop containers | ||
[Documentation] Stop containers | ||
Publish command from file ${broker.uri} ${broker.port} ${topic_pub_desiredstate} ${desired_state_no_containers_filename} | ||
${result}= Check containers status ${broker.uri} ${broker.port} Stopped @{stop_containers} | ||
Should Be Empty ${result} msg=Container(s) ${result} must be Stopped | ||
|
||
Bring all containers running | ||
[Documentation] Bring all containers running | ||
Publish command from file ${broker.uri} ${broker.port} ${topic_pub_desiredstate} ${desired_state_filename} | ||
${result}= Check containers status ${broker.uri} ${broker.port} Running @{containers} | ||
Should Be Empty ${result} msg=Container(s) ${result} must be Running | ||
${result}= Check containers status ${broker.uri} ${broker.port} Any @{any_state_containers} | ||
Should Be Empty ${result} msg=Container(s) ${result} must persist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...s/docker-snapshot/dockerfiles/leda-tests/robot-resources/desired-state-no-containers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"activityId": "activity-id-no-containers", | ||
"payload": { | ||
"domains": [{ | ||
"id": "containers", | ||
"config": [], | ||
"components": [ | ||
|
||
] | ||
}] | ||
} | ||
} |
Oops, something went wrong.