From d02cae9e4cf21428425e0cf5e1ce02ac30b7aad3 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Thu, 16 Nov 2023 21:40:16 +0200 Subject: [PATCH] Improve generated resource names and logs - Use `{name}-drpc` instead of `busybox-drpc` - Remove hard-coded 'busybox example' in logs - Add application name to deploy/undeploy logs Signed-off-by: Nir Soffer --- test/basic-test/undeploy | 4 ++-- test/drenv/test.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/basic-test/undeploy b/test/basic-test/undeploy index 7fa04aca12..950bf4768c 100755 --- a/test/basic-test/undeploy +++ b/test/basic-test/undeploy @@ -8,6 +8,6 @@ from drenv import test test.start("undeploy", __file__) args = test.parse_args() -test.info("Deleting busybox example application") +test.info("Deleting application") test.undeploy() -test.info("Application was undeployed successfully") +test.info("Application was deleted") diff --git a/test/drenv/test.py b/test/drenv/test.py index a261bbec25..95d1c39ba5 100644 --- a/test/drenv/test.py +++ b/test/drenv/test.py @@ -171,7 +171,7 @@ def deploy(): """ Deploy application on cluster. """ - info("Deploying application") + info("Deploying application '%s'", config["name"]) kubectl.apply( f"--kustomize={config['repo']}/{config['path']}?ref={config['branch']}", context=env["hub"], @@ -183,7 +183,7 @@ def undeploy(): """ Undeploy an application. """ - info("Undeploying application") + info("Undeploying application '%s'", config["name"]) kubectl.delete( f"--kustomize={config['repo']}/{config['path']}?ref={config['branch']}", "--ignore-not-found", @@ -216,7 +216,7 @@ def enable_dr(): apiVersion: ramendr.openshift.io/v1alpha1 kind: DRPlacementControl metadata: - name: busybox-drpc + name: {config['name']}-drpc namespace: {config['namespace']} labels: app: {config['name']}