@@ -797,7 +797,6 @@ func TestAccStorageBucket_update(t *testing.T) {
797797 t .Parallel ()
798798
799799 var bucket storage.Bucket
800- var recreated storage.Bucket
801800 var updated storage.Bucket
802801 bucketName := fmt .Sprintf ("tf-test-acl-bucket-%d" , acctest .RandInt (t ))
803802
@@ -806,27 +805,11 @@ func TestAccStorageBucket_update(t *testing.T) {
806805 ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories (t ),
807806 CheckDestroy : testAccStorageBucketDestroyProducer (t ),
808807 Steps : []resource.TestStep {
809- {
810- Config : testAccStorageBucket_basic (bucketName ),
811- Check : resource .ComposeTestCheckFunc (
812- testAccCheckStorageBucketExists (
813- t , "google_storage_bucket.bucket" , bucketName , & bucket ),
814- resource .TestCheckResourceAttr (
815- "google_storage_bucket.bucket" , "force_destroy" , "false" ),
816- ),
817- },
818- {
819- ResourceName : "google_storage_bucket.bucket" ,
820- ImportState : true ,
821- ImportStateVerify : true ,
822- ImportStateVerifyIgnore : []string {"force_destroy" },
823- },
824808 {
825809 Config : testAccStorageBucket_customAttributes (bucketName ),
826810 Check : resource .ComposeTestCheckFunc (
827811 testAccCheckStorageBucketExists (
828- t , "google_storage_bucket.bucket" , bucketName , & recreated ),
829- testAccCheckStorageBucketWasRecreated (& recreated , & bucket ),
812+ t , "google_storage_bucket.bucket" , bucketName , & bucket ),
830813 resource .TestCheckResourceAttr (
831814 "google_storage_bucket.bucket" , "force_destroy" , "true" ),
832815 ),
@@ -842,7 +825,7 @@ func TestAccStorageBucket_update(t *testing.T) {
842825 Check : resource .ComposeTestCheckFunc (
843826 testAccCheckStorageBucketExists (
844827 t , "google_storage_bucket.bucket" , bucketName , & updated ),
845- testAccCheckStorageBucketWasUpdated (& updated , & recreated ),
828+ testAccCheckStorageBucketWasUpdated (& updated , & bucket ),
846829 resource .TestCheckResourceAttr (
847830 "google_storage_bucket.bucket" , "force_destroy" , "true" ),
848831 ),
@@ -858,7 +841,7 @@ func TestAccStorageBucket_update(t *testing.T) {
858841 Check : resource .ComposeTestCheckFunc (
859842 testAccCheckStorageBucketExists (
860843 t , "google_storage_bucket.bucket" , bucketName , & updated ),
861- testAccCheckStorageBucketWasUpdated (& updated , & recreated ),
844+ testAccCheckStorageBucketWasUpdated (& updated , & bucket ),
862845 resource .TestCheckResourceAttr (
863846 "google_storage_bucket.bucket" , "force_destroy" , "true" ),
864847 ),
@@ -874,7 +857,7 @@ func TestAccStorageBucket_update(t *testing.T) {
874857 Check : resource .ComposeTestCheckFunc (
875858 testAccCheckStorageBucketExists (
876859 t , "google_storage_bucket.bucket" , bucketName , & updated ),
877- testAccCheckStorageBucketWasUpdated (& updated , & recreated ),
860+ testAccCheckStorageBucketWasUpdated (& updated , & bucket ),
878861 resource .TestCheckResourceAttr (
879862 "google_storage_bucket.bucket" , "force_destroy" , "true" ),
880863 ),
@@ -890,7 +873,7 @@ func TestAccStorageBucket_update(t *testing.T) {
890873 Check : resource .ComposeTestCheckFunc (
891874 testAccCheckStorageBucketExists (
892875 t , "google_storage_bucket.bucket" , bucketName , & updated ),
893- testAccCheckStorageBucketWasUpdated (& updated , & recreated ),
876+ testAccCheckStorageBucketWasUpdated (& updated , & bucket ),
894877 resource .TestCheckResourceAttr (
895878 "google_storage_bucket.bucket" , "force_destroy" , "true" ),
896879 ),
0 commit comments