Skip to content

Commit

Permalink
Generation of Job name for tests fixed (#2386)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Aksenov <[email protected]>
  • Loading branch information
k0taperk0t authored and Le Tran committed Oct 18, 2023
1 parent 9fbc217 commit ba4cd32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/kube/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<unknown name>"

const testJobNamespace = "default"
const testJobImage = "busybox"
Expand All @@ -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.
Expand Down

0 comments on commit ba4cd32

Please sign in to comment.