diff options
author | 2023-03-16 13:43:57 +0000 | |
---|---|---|
committer | 2023-03-17 11:06:08 +0000 | |
commit | 066e6c39c2a5133f89d1f00f25a247f7ce402f10 (patch) | |
tree | b2d7eb9b67ee7ec53da8ad2aa2aa8dff0b4758fd /src/onaptests/steps/onboard/service.py | |
parent | d6d052a5f1ce0ae0f0debcbb11220fce1c1dfdc5 (diff) |
Fix tests regression
Delete SDC resources only if exists and archive all before delete
Bump onapsdk requirements
Issue-ID: INT-2193
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I1c116b93ab1dc4be2501df57b2a7d2d97354cfa5
Diffstat (limited to 'src/onaptests/steps/onboard/service.py')
-rw-r--r-- | src/onaptests/steps/onboard/service.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/onaptests/steps/onboard/service.py b/src/onaptests/steps/onboard/service.py index 60ac279..d176697 100644 --- a/src/onaptests/steps/onboard/service.py +++ b/src/onaptests/steps/onboard/service.py @@ -86,7 +86,9 @@ class ServiceOnboardStep(BaseStep): def cleanup(self) -> None: """Cleanup service onboard step.""" service: Service = Service(name=settings.SERVICE_NAME) - service.delete() + if service.exists(): + service.archive() + service.delete() super().cleanup() @@ -265,5 +267,7 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep): def cleanup(self) -> None: """Cleanup service onboard step.""" service: Service = Service(name=self.service_name) - service.delete() + if service.exists(): + service.archive() + service.delete() super().cleanup() |