diff options
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() |