diff options
author | Lukasz Woznicki <lukasz.woznicki@softwareag.com> | 2022-02-25 08:23:36 +0000 |
---|---|---|
committer | Lukasz Woznicki <lukasz.woznicki@softwareag.com> | 2022-02-25 08:23:36 +0000 |
commit | 4189f74467f814c021bb90efd7c71d540b9922d1 (patch) | |
tree | 3147fc457eab2663e1e05fe172d9772d15f490e7 /tests | |
parent | 5b918722498871637163d32aa4d4aaa2808394e8 (diff) |
Remove remaining sm-mapper mentions
Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PySys/software_management_end_to_end/sm_mapper_fail_and_reconnect/run.py | 18 | ||||
-rw-r--r-- | tests/PySys/tedge_mapper_c8y/sm_tedge_mapper_init_session/run.py | 30 |
2 files changed, 24 insertions, 24 deletions
diff --git a/tests/PySys/software_management_end_to_end/sm_mapper_fail_and_reconnect/run.py b/tests/PySys/software_management_end_to_end/sm_mapper_fail_and_reconnect/run.py index 09c9d0b3..b5819982 100644 --- a/tests/PySys/software_management_end_to_end/sm_mapper_fail_and_reconnect/run.py +++ b/tests/PySys/software_management_end_to_end/sm_mapper_fail_and_reconnect/run.py @@ -6,25 +6,25 @@ from pathlib import Path from environment_tedge import TedgeEnvironment """ -Validate the tedge-mapper-sm-c8y does not loose last message from tedge-agent when it fails and comes back +Validate the tedge-mapper-c8y does not loose last message from tedge-agent when it fails and comes back Given a configured system When `rolldice` package is installed when a subscriber is started as `sudo tedge mqtt sub 'c8y/s/us'` When tedge_agent is started as `sudo systemctl start tedge-agent.service` -When sm mapper is started as `sudo systemctl start tedge-mapper-sm-c8y.service` +When c8y mapper is started as `sudo systemctl start tedge-mapper-c8y.service` When send a delete operation `sudo tedge mqtt pub "c8y/s/ds" "528,tedge,rolldice,,,delete"` -When sm mapper is stopped `sudo systemctl stop tedge-mapper-sm-c8y.service` +When c8y mapper is stopped `sudo systemctl stop tedge-mapper-c8y.service` Wait for sometime for operation to be completed and agent to push the operation result. -When sm mapper is restarted `sudo systemctl restart tedge-mapper-sm-c8y.service` -Now sm mapper receives the last update result message, process and forwards it to the cloud on `c8y/s/us` +When c8y mapper is restarted `sudo systemctl restart tedge-mapper-c8y.service` +Now c8y mapper receives the last update result message, process and forwards it to the cloud on `c8y/s/us` Then validate subscriber output for `501,c8y_SoftwareUpdate`, for the status of operation Then validate subscriber output for `503,c8y_SoftwareUpdate` for final result of operation Then test has passed """ -class SmMapperC8yReceiveLastMessageOnRestart(BaseTest): +class MapperC8yReceiveLastMessageOnRestart(BaseTest): systemctl = "/usr/bin/systemctl" tedge = "/usr/bin/tedge" sudo = "/usr/bin/sudo" @@ -64,7 +64,7 @@ class SmMapperC8yReceiveLastMessageOnRestart(BaseTest): self.startProcess( command=self.sudo, arguments=[self.systemctl, "stop", "tedge-mapper-c8y.service"], - stdouterr="sm_mapper_stop", + stdouterr="mapper_stop", ) self.startProcess( @@ -80,10 +80,10 @@ class SmMapperC8yReceiveLastMessageOnRestart(BaseTest): self.startProcess( command=self.sudo, arguments=[self.systemctl, "restart", "tedge-mapper-c8y.service"], - stdouterr="sm_mapper_restart", + stdouterr="mapper_restart", ) - # wait for the sm mapper to process and publish result to cloud + # wait for the c8y mapper to process and publish result to cloud # and subscriber to capture the output and log it. time.sleep(30) diff --git a/tests/PySys/tedge_mapper_c8y/sm_tedge_mapper_init_session/run.py b/tests/PySys/tedge_mapper_c8y/sm_tedge_mapper_init_session/run.py index 64d1cf80..f6847d44 100644 --- a/tests/PySys/tedge_mapper_c8y/sm_tedge_mapper_init_session/run.py +++ b/tests/PySys/tedge_mapper_c8y/sm_tedge_mapper_init_session/run.py @@ -1,6 +1,5 @@ from pysys.basetest import BaseTest - """ Validate tedge_mapper sm-c8y init session feature. @@ -12,8 +11,8 @@ Then clean the tedge-mapper-sm-c8y session that is present in the broker Then initialize the tedge-mapper-sm-c8y session and subscribing to the topics Then publish a software list request onto c8y/s/us Then start a subscriber to get the request 'tedge/commands/res/software/list' -Then start the tedge-mapper-sm-c8y -Now the mapper should receive the request that was receive the previous request +Then start the tedge-mapper-sm-c8y +Now the mapper should receive the request that was receive the previous request and forward the request to agent on 'tedge/commands/res/software/list' Now stop the subscriber and validate the message received on 'tedge/commands/res/software/list' Validate the response for that contains id. @@ -21,6 +20,7 @@ Validate the response for that contains id. """ from environment_c8y import EnvironmentC8y + class TedgeSMMapperInitSession(EnvironmentC8y): def setup(self): super().setup() @@ -35,43 +35,43 @@ class TedgeSMMapperInitSession(EnvironmentC8y): stop_tedge_mapper = self.startProcess( command=self.sudo, - arguments=["systemctl", "stop", "tedge-mapper-sm-c8y"], + arguments=["systemctl", "stop", "tedge-mapper-c8y"], stdouterr="stop_tedge_mapper", ) remove_lock = self.startProcess( command=self.sudo, arguments=["rm", "-rf", "/var/lock/sm-c8y-mapper.lock"], - stdouterr="remove_lock", + stdouterr="remove_lock", ) mapper_drop = self.startProcess( command=self.sudo, - arguments=[self.tedge_mapper, "--clear", "sm-c8y"], - stdouterr="mapper_drop", + arguments=[self.tedge_mapper, "--clear", "c8y"], + stdouterr="mapper_drop", ) - + mapper_init = self.startProcess( command=self.sudo, - arguments=[self.tedge_mapper, "--init", "sm-c8y"], - stdouterr="mapper_init", + arguments=[self.tedge_mapper, "--init", "c8y"], + stdouterr="mapper_init", ) pub_req = self.startProcess( command=self.sudo, arguments=[self.tedge, "mqtt", "pub", "--qos", "1", "c8y/s/us", "118,software-management"], - stdouterr="pub_req", + stdouterr="pub_req", ) sub_resp = self.startProcess( command=self.sudo, arguments=[self.tedge, "mqtt", "sub", "tedge/commands/req/software/list"], stdouterr="sub_resp", - background=True, + background=True, ) - + start_mapper = self.startProcess( command=self.sudo, - arguments=[self.systemctl, "start", "tedge-mapper-sm-c8y"], + arguments=[self.systemctl, "start", "tedge-mapper-c8y"], stdouterr="start_mapper", ) @@ -87,4 +87,4 @@ class TedgeSMMapperInitSession(EnvironmentC8y): self.assertGrep("sub_resp.out", "id", contains=True) def init_cleanup(self): - super().myenvcleanup() + super().myenvcleanup() |