aboutsummaryrefslogtreecommitdiffstats
path: root/run_status.py
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2023-05-18 21:04:51 +0000
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2023-05-23 06:55:33 +0000
commit6dc4f7277cd749ebe278ae0838c34ff3a2481ef9 (patch)
tree344acc25ef03dd20be9e49195759e5bd2001b4ed /run_status.py
parentdeb99c7b3c7caaf9704e6316f7eba062a54b04fc (diff)
Refactor status verification test
Issue-ID: INT-2239 Signed-off-by: pawel.denst <pawel.denst@external.t-mobile.pl> Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: I6db4d1d46536b0e1d6aeac2d8c9a569ed007f590
Diffstat (limited to 'run_status.py')
-rw-r--r--run_status.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/run_status.py b/run_status.py
index cf36cb6..0c3aaf1 100644
--- a/run_status.py
+++ b/run_status.py
@@ -1,3 +1,21 @@
-from onaptests.scenario.status import Status
-status=Status(dir_result="src")
-status.run() \ No newline at end of file
+import logging.config
+import onaptests.utils.exceptions as onap_test_exceptions
+from onapsdk.configuration import settings
+from onaptests.steps.cloud.check_status import CheckNamespaceStatusStep
+
+
+
+if __name__ == "__main__":
+ # logging configuration for onapsdk, it is not requested for onaptests
+ # Correction requested in onapsdk to avoid having this duplicate code
+ logging.config.dictConfig(settings.LOG_CONFIG)
+ logger = logging.getLogger("Status Check")
+
+ status = CheckNamespaceStatusStep(
+ cleanup=settings.CLEANUP_FLAG)
+ try:
+ status.execute()
+ status.cleanup()
+ except onap_test_exceptions.TestConfigurationException:
+ logger.error("Status Check configuration error")
+ status.reports_collection.generate_report() \ No newline at end of file