@@ -77,7 +77,6 @@ func TestAccGitlabProject_basic(t *testing.T) {
7777 PackagesEnabled : true ,
7878 PrintingMergeRequestLinkEnabled : true ,
7979 PagesAccessLevel : gitlab .PublicAccessControl ,
80- BuildCoverageRegex : "foo" ,
8180 IssuesTemplate : "" ,
8281 MergeRequestsTemplate : "" ,
8382 CIConfigPath : ".gitlab-ci.yml@mynamespace/myproject" ,
@@ -158,7 +157,6 @@ func TestAccGitlabProject_basic(t *testing.T) {
158157 Archived : true ,
159158 PackagesEnabled : false ,
160159 PagesAccessLevel : gitlab .DisabledAccessControl ,
161- BuildCoverageRegex : "bar" ,
162160 CIForwardDeploymentEnabled : false ,
163161 ResolveOutdatedDiffDiscussions : false ,
164162 AnalyticsAccessLevel : gitlab .DisabledAccessControl ,
@@ -736,7 +734,6 @@ func TestAccGitlabProject_transfer(t *testing.T) {
736734 PackagesEnabled : true ,
737735 PrintingMergeRequestLinkEnabled : true ,
738736 PagesAccessLevel : gitlab .PrivateAccessControl ,
739- BuildCoverageRegex : "foo" ,
740737 CIForwardDeploymentEnabled : true ,
741738 }
742739
@@ -1148,6 +1145,38 @@ func TestAccGitlabProject_containerExpirationPolicy(t *testing.T) {
11481145 })
11491146}
11501147
1148+ func TestAccGitlabProject_DeprecatedBuildCoverageRegex (t * testing.T ) {
1149+ var received gitlab.Project
1150+ rInt := acctest .RandInt ()
1151+
1152+ resource .Test (t , resource.TestCase {
1153+ PreCheck : func () { testAccPreCheck (t ) },
1154+ ProviderFactories : providerFactories ,
1155+ CheckDestroy : testAccCheckGitlabProjectDestroy ,
1156+ Steps : []resource.TestStep {
1157+ {
1158+ SkipFunc : isGitLabVersionLessThan (context .Background (), testGitlabClient , "15.0" ),
1159+ Config : fmt .Sprintf (`
1160+ resource "gitlab_project" "this" {
1161+ name = "foo-%d"
1162+ visibility_level = "public"
1163+
1164+ build_coverage_regex = "helloWorld"
1165+ }` , rInt ),
1166+ Check : resource .ComposeTestCheckFunc (
1167+ testAccCheckGitlabProjectExists ("gitlab_project.this" , & received ),
1168+ ),
1169+ },
1170+ {
1171+ SkipFunc : isGitLabVersionLessThan (context .Background (), testGitlabClient , "15.0" ),
1172+ ResourceName : "gitlab_project.this" ,
1173+ ImportState : true ,
1174+ ImportStateVerify : true ,
1175+ },
1176+ },
1177+ })
1178+ }
1179+
11511180func testAccCheckGitlabProjectExists (n string , project * gitlab.Project ) resource.TestCheckFunc {
11521181 return func (s * terraform.State ) error {
11531182 var err error
@@ -1359,7 +1388,6 @@ resource "gitlab_project" "foo" {
13591388 # So that acceptance tests can be run in a gitlab organization
13601389 # with no billing
13611390 visibility_level = "public"
1362- build_coverage_regex = "foo"
13631391}
13641392 ` , rInt , rInt , rInt )
13651393}
@@ -1415,7 +1443,6 @@ resource "gitlab_project" "foo" {
14151443 # So that acceptance tests can be run in a gitlab organization
14161444 # with no billing
14171445 visibility_level = "public"
1418- build_coverage_regex = "foo"
14191446}
14201447
14211448resource "gitlab_project_variable" "foo" {
@@ -1449,7 +1476,6 @@ resource "gitlab_project" "foo" {
14491476 # So that acceptance tests can be run in a gitlab organization
14501477 # with no billing
14511478 visibility_level = "public"
1452- build_coverage_regex = "foo"
14531479}
14541480
14551481resource "gitlab_project_variable" "foo" {
@@ -1489,7 +1515,6 @@ resource "gitlab_project" "foo" {
14891515 only_allow_merge_if_all_discussions_are_resolved = true
14901516 squash_option = "default_off"
14911517 pages_access_level = "public"
1492- build_coverage_regex = "foo"
14931518 allow_merge_on_skipped_pipeline = false
14941519 ci_config_path = ".gitlab-ci.yml@mynamespace/myproject"
14951520 resolve_outdated_diff_discussions = true
@@ -1589,7 +1614,6 @@ resource "gitlab_project" "foo" {
15891614 archived = true
15901615 packages_enabled = false
15911616 pages_access_level = "disabled"
1592- build_coverage_regex = "bar"
15931617 ci_forward_deployment_enabled = false
15941618 merge_pipelines_enabled = false
15951619 merge_trains_enabled = false
@@ -1929,7 +1953,6 @@ resource "gitlab_project" "foo" {
19291953 only_allow_merge_if_all_discussions_are_resolved = true
19301954 squash_option = "default_off"
19311955 pages_access_level = "public"
1932- build_coverage_regex = "foo"
19331956 allow_merge_on_skipped_pipeline = false
19341957 ci_config_path = ".gitlab-ci.yml@mynamespace/myproject"
19351958 resolve_outdated_diff_discussions = true
0 commit comments