Skip to content

Commit

Permalink
Tests pass against test environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmaclean committed Oct 26, 2023
1 parent 516c21c commit a517af2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ func resourceStorageBucketObjectUpdate(d *schema.ResourceData, meta interface{})
if hasRetentionChanges {
if v, ok := d.GetOk("retention"); ok {
res.Retention = expandObjectRetention(v)
} else {
res.Retention = nil
res.NullFields = append(res.NullFields, "Retention")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,13 @@ func TestAccStorageObject_retention(t *testing.T) {
CheckDestroy: testAccStorageObjectDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testGoogleStorageBucketsObjectRetention(bucketName, "2040-01-01T02:03:04Z"),
Config: testGoogleStorageBucketsObjectRetention(bucketName, "2040-01-01T02:03:04.000Z"),
Check: resource.ComposeTestCheckFunc(
testAccCheckGoogleStorageObject(t, bucketName, objectName, dataMd5),
),
},
{
Config: testGoogleStorageBucketsObjectRetention(bucketName, "2040-01-02T02:03:04Z"),
Config: testGoogleStorageBucketsObjectRetention(bucketName, "2040-01-02T02:03:04.000Z"),
Check: resource.ComposeTestCheckFunc(
testAccCheckGoogleStorageObject(t, bucketName, objectName, dataMd5),
),
Expand Down

0 comments on commit a517af2

Please sign in to comment.