@@ -86,6 +86,38 @@ func TestAccArtifactRegistryRepository_createMvnRelease(t *testing.T) {
8686 })
8787}
8888
89+ func TestAccArtifactRegistryRepository_updateEmptyMvn (t * testing.T ) {
90+ t .Parallel ()
91+
92+ repositoryID := fmt .Sprintf ("tf-test-%d" , acctest .RandInt (t ))
93+
94+ acctest .VcrTest (t , resource.TestCase {
95+ PreCheck : func () { acctest .AccTestPreCheck (t ) },
96+ ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories (t ),
97+ CheckDestroy : testAccCheckArtifactRegistryRepositoryDestroyProducer (t ),
98+ Steps : []resource.TestStep {
99+ {
100+ Config : testAccArtifactRegistryRepository_createMvnEmpty1 (repositoryID ),
101+ },
102+ {
103+ ResourceName : "google_artifact_registry_repository.test" ,
104+ ImportState : true ,
105+ ImportStateVerify : true ,
106+ },
107+ {
108+ Config : testAccArtifactRegistryRepository_createMvnEmpty2 (repositoryID ),
109+ PlanOnly : true ,
110+ ExpectNonEmptyPlan : false ,
111+ },
112+ {
113+ Config : testAccArtifactRegistryRepository_createMvnEmpty3 (repositoryID ),
114+ PlanOnly : true ,
115+ ExpectNonEmptyPlan : false ,
116+ },
117+ },
118+ })
119+ }
120+
89121func TestAccArtifactRegistryRepository_kfp (t * testing.T ) {
90122 t .Parallel ()
91123
@@ -154,6 +186,43 @@ resource "google_artifact_registry_repository" "test" {
154186` , repositoryID , versionPolicy )
155187}
156188
189+ func testAccArtifactRegistryRepository_createMvnEmpty1 (repositoryID string ) string {
190+ return fmt .Sprintf (`
191+ resource "google_artifact_registry_repository" "test" {
192+ repository_id = "%s"
193+ location = "us-central1"
194+ description = "maven repository with empty maven_config"
195+ format = "MAVEN"
196+ }
197+ ` , repositoryID )
198+ }
199+
200+ func testAccArtifactRegistryRepository_createMvnEmpty2 (repositoryID string ) string {
201+ return fmt .Sprintf (`
202+ resource "google_artifact_registry_repository" "test" {
203+ repository_id = "%s"
204+ location = "us-central1"
205+ description = "maven repository with empty maven_config"
206+ format = "MAVEN"
207+ maven_config { }
208+ }
209+ ` , repositoryID )
210+ }
211+
212+ func testAccArtifactRegistryRepository_createMvnEmpty3 (repositoryID string ) string {
213+ return fmt .Sprintf (`
214+ resource "google_artifact_registry_repository" "test" {
215+ repository_id = "%s"
216+ location = "us-central1"
217+ description = "maven repository with empty maven_config"
218+ format = "MAVEN"
219+ maven_config {
220+ allow_snapshot_overwrites = false
221+ }
222+ }
223+ ` , repositoryID )
224+ }
225+
157226func testAccArtifactRegistryRepository_kfp (repositoryID string ) string {
158227 return fmt .Sprintf (`
159228resource "google_artifact_registry_repository" "test" {
0 commit comments