Skip to content

Commit 996f276

Browse files
Huseyin UnalHuseyin Unal
authored andcommitted
Add import test
1 parent 05bf2ec commit 996f276

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

gitlab/resource_gitlab_project_level_mr_approvals_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,29 @@ func TestAccGitlabProjectLevelMRApprovals_basic(t *testing.T) {
3737
})
3838
}
3939

40+
func TestAccGitlabProjectLevelMRApprovals_import(t *testing.T) {
41+
resourceName := "gitlab_project_level_mr_approvals.foo"
42+
rInt := acctest.RandInt()
43+
44+
resource.Test(t, resource.TestCase{
45+
PreCheck: func() { testAccPreCheck(t) },
46+
Providers: testAccProviders,
47+
CheckDestroy: testAccCheckGitlabProjectLevelMRApprovalsDestroy,
48+
Steps: []resource.TestStep{
49+
{
50+
SkipFunc: isRunningInCE,
51+
Config: testAccGitlabProjectLevelMRApprovalsUpdateConfig(rInt),
52+
},
53+
{
54+
ResourceName: resourceName,
55+
ImportState: true,
56+
ImportStateVerify: true,
57+
ImportStateVerifyIgnore: []string{"project_id"},
58+
},
59+
},
60+
})
61+
}
62+
4063
type testAccGitlabProjectLevelMRApprovalsExpectedAttributes struct {
4164
resetApprovalsOnPush bool
4265
disableOverridingApproversPerMergeRequest bool

0 commit comments

Comments
 (0)