From de47052404594186d7885eae1cb1b78b44a7cd09 Mon Sep 17 00:00:00 2001 From: Didier Wenzek Date: Tue, 27 Aug 2024 10:29:26 +0200 Subject: [PATCH] Simplify operation workflow test Signed-off-by: Didier Wenzek --- .../tests/tedge_agent/workflows/custom_operation.robot | 1 - .../tests/tedge_agent/workflows/init-software-list.sh | 8 -------- .../tests/tedge_agent/workflows/software_list.toml | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) delete mode 100755 tests/RobotFramework/tests/tedge_agent/workflows/init-software-list.sh diff --git a/tests/RobotFramework/tests/tedge_agent/workflows/custom_operation.robot b/tests/RobotFramework/tests/tedge_agent/workflows/custom_operation.robot index b294b9abf3e..f08bed5eb50 100644 --- a/tests/RobotFramework/tests/tedge_agent/workflows/custom_operation.robot +++ b/tests/RobotFramework/tests/tedge_agent/workflows/custom_operation.robot @@ -138,7 +138,6 @@ Custom Setup Copy Configuration Files ThinEdgeIO.Transfer To Device ${CURDIR}/software_list.toml /etc/tedge/operations/ - ThinEdgeIO.Transfer To Device ${CURDIR}/init-software-list.sh /etc/tedge/operations/ ThinEdgeIO.Transfer To Device ${CURDIR}/custom-download.toml /etc/tedge/operations/ ThinEdgeIO.Transfer To Device ${CURDIR}/schedule-download.sh /etc/tedge/operations/ ThinEdgeIO.Transfer To Device ${CURDIR}/launch-download.sh /etc/tedge/operations/ diff --git a/tests/RobotFramework/tests/tedge_agent/workflows/init-software-list.sh b/tests/RobotFramework/tests/tedge_agent/workflows/init-software-list.sh deleted file mode 100755 index 6a2c754dcd5..00000000000 --- a/tests/RobotFramework/tests/tedge_agent/workflows/init-software-list.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -echo new software list request topic = "$1" >>/tmp/operations.log - -echo ':::begin-tedge:::' -echo '{ "status":"scheduled" }' -echo ':::end-tedge:::' diff --git a/tests/RobotFramework/tests/tedge_agent/workflows/software_list.toml b/tests/RobotFramework/tests/tedge_agent/workflows/software_list.toml index 6eeba5303de..322bfd891cb 100644 --- a/tests/RobotFramework/tests/tedge_agent/workflows/software_list.toml +++ b/tests/RobotFramework/tests/tedge_agent/workflows/software_list.toml @@ -1,7 +1,7 @@ operation = "software_list" # A built in operation can be overridden [init] -script = "/etc/tedge/operations/init-software-list.sh ${.topic}" # The json output of the script is used for the next step +script = "/etc/tedge/operations/echo-as-json.sh status scheduled on_stdout = ["scheduled"] [scheduled]