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.