From ba4cd325e0f4a1fe3127720f8bbd8af51c72f7a2 Mon Sep 17 00:00:00 2001 From: Sergey Aksenov Date: Thu, 12 Oct 2023 18:48:00 +0200 Subject: [PATCH] Generation of Job name for tests fixed (#2386) Signed-off-by: Sergey Aksenov --- pkg/kube/job_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/kube/job_test.go b/pkg/kube/job_test.go index acf10cf9fa..4c8000ac0a 100644 --- a/pkg/kube/job_test.go +++ b/pkg/kube/job_test.go @@ -36,7 +36,9 @@ type JobSuite struct{} var _ = Suite(&JobSuite{}) -var testJobName = "kanister-test-job" +// Name of test job for this suite. +// Initially it contains incorrect name of job for catching errors. +var testJobName = "" const testJobNamespace = "default" const testJobImage = "busybox" @@ -47,7 +49,7 @@ func (s *JobSuite) SetUpSuite(c *C) { } func (s *JobSuite) SetUpTest(c *C) { - testJobName = testJobName + rand.String(5) + testJobName = "kanister-test-job" + rand.String(5) } // Verifies that the Job object is not created if the job name is not specified.