From 228422c1c1773c9e7c0e720e5b2f0f77419e285b Mon Sep 17 00:00:00 2001 From: shiva kumar Date: Thu, 19 Dec 2024 13:14:24 +0530 Subject: [PATCH] unused aws instace and vpcs cleanup Signed-off-by: shiva kumar --- tests/aws_test.go | 3 ++- tests/common/common.go | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/aws_test.go b/tests/aws_test.go index c006a482..985c433e 100644 --- a/tests/aws_test.go +++ b/tests/aws_test.go @@ -29,6 +29,7 @@ import ( "github.com/NVIDIA/holodeck/pkg/jyaml" "github.com/NVIDIA/holodeck/pkg/provider" "github.com/NVIDIA/holodeck/pkg/provisioner" + "github.com/NVIDIA/holodeck/tests/common" ) // Actual test suite @@ -55,8 +56,8 @@ var _ = Describe("AWS", func() { Expect(err).ToNot(HaveOccurred()) // Set unique name for the environment - // Set env name common.setCfgName(&opts.cfg) + opts.cfg.Name = opts.cfg.Name + "-" + common.GenerateUID() // set cache path opts.cachePath = LogArtifactDir // set cache file diff --git a/tests/common/common.go b/tests/common/common.go index 829b9825..f32e1adb 100644 --- a/tests/common/common.go +++ b/tests/common/common.go @@ -42,8 +42,9 @@ func setCfgName(cfg *v1alpha1.Environment) { if len(sha) > 8 { sha = sha[:8] } - // uid is unique for each run - uid := GenerateUID() + // // uid is unique for each run + // uid := GenerateUID() - cfg.Name = fmt.Sprintf("ci%s-%s-%s", attempt, sha, uid) + // cfg.Name = fmt.Sprintf("ci%s-%s-%s", attempt, sha, uid) + cfg.Name = fmt.Sprintf("ci%s-%s", attempt, sha) }