From e19db3ebeecda750f76c31a039c182a8cd98a286 Mon Sep 17 00:00:00 2001 From: Valentin Deleplace Date: Wed, 3 Jul 2024 16:06:55 +0200 Subject: [PATCH] fix(batch): valid date format layout Part of #4246 --- batch/create_with_gcs_bucket_test.go | 5 ++--- batch/create_with_template_test.go | 5 ++--- batch/job_basics_test.go | 6 ++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/batch/create_with_gcs_bucket_test.go b/batch/create_with_gcs_bucket_test.go index cc41c2be65..46b91817f2 100644 --- a/batch/create_with_gcs_bucket_test.go +++ b/batch/create_with_gcs_bucket_test.go @@ -27,14 +27,13 @@ import ( ) func TestCreateJobWithBucket(t *testing.T) { - t.Skip("Skipped while investigating https://github.com/GoogleCloudPlatform/golang-samples/issues/2811") t.Parallel() var r *rand.Rand = rand.New( rand.NewSource(time.Now().UnixNano())) tc := testutil.SystemTest(t) region := "us-central1" - jobName := fmt.Sprintf("test-job-go-bucket-%v-%v", time.Now().Format("2006-12-25"), r.Int()) - bucketName := fmt.Sprintf("test-bucket-go-batch-%v-%v", time.Now().Format("2006-12-25"), r.Int()) + jobName := fmt.Sprintf("test-job-go-bucket-%v-%v", time.Now().Format("2006-01-02"), r.Int()) + bucketName := fmt.Sprintf("test-bucket-go-batch-%v-%v", time.Now().Format("2006-01-02"), r.Int()) buf := &bytes.Buffer{} if err := createBucket(tc.ProjectID, bucketName); err != nil { diff --git a/batch/create_with_template_test.go b/batch/create_with_template_test.go index 083aeaea71..1a7c6552e5 100644 --- a/batch/create_with_template_test.go +++ b/batch/create_with_template_test.go @@ -30,14 +30,13 @@ import ( ) func TestCreateJobWithTemplate(t *testing.T) { - t.Skip("Skipped while investigating https://github.com/GoogleCloudPlatform/golang-samples/issues/2811") t.Parallel() var r *rand.Rand = rand.New( rand.NewSource(time.Now().UnixNano())) tc := testutil.SystemTest(t) region := "us-central1" - jobName := fmt.Sprintf("test-job-go-template-%v-%v", time.Now().Format("2006-12-25"), r.Int()) - templateName := fmt.Sprintf("test-template-go-batch-%v-%v", time.Now().Format("2006-12-25"), r.Int()) + jobName := fmt.Sprintf("test-job-go-template-%v-%v", time.Now().Format("2006-01-02"), r.Int()) + templateName := fmt.Sprintf("test-template-go-batch-%v-%v", time.Now().Format("2006-01-02"), r.Int()) buf := &bytes.Buffer{} if err := createTemplate(tc.ProjectID, templateName); err != nil { diff --git a/batch/job_basics_test.go b/batch/job_basics_test.go index 72277a19f4..0f8b33019c 100644 --- a/batch/job_basics_test.go +++ b/batch/job_basics_test.go @@ -26,13 +26,12 @@ import ( ) func TestBatchJobCRUD(t *testing.T) { - t.Skip("Skipped while investigating https://github.com/GoogleCloudPlatform/golang-samples/issues/2811") t.Parallel() var r *rand.Rand = rand.New( rand.NewSource(time.Now().UnixNano())) tc := testutil.SystemTest(t) region := "us-central1" - jobName := fmt.Sprintf("test-job-go-script-%v-%v", time.Now().Format("2006-12-25"), r.Int()) + jobName := fmt.Sprintf("test-job-go-script-%v-%v", time.Now().Format("2006-01-02"), r.Int()) buf := &bytes.Buffer{} @@ -101,13 +100,12 @@ func TestBatchJobCRUD(t *testing.T) { } func TestBatchContainerJob(t *testing.T) { - t.Skip("Skipped while investigating https://github.com/GoogleCloudPlatform/golang-samples/issues/2811") t.Parallel() var r *rand.Rand = rand.New( rand.NewSource(time.Now().UnixNano())) tc := testutil.SystemTest(t) region := "us-central1" - jobName := fmt.Sprintf("test-job-go-docker-%v-%v", time.Now().Format("2006-12-25"), r.Int()) + jobName := fmt.Sprintf("test-job-go-docker-%v-%v", time.Now().Format("2006-01-02"), r.Int()) buf := &bytes.Buffer{}