Skip to content

Commit b212a40

Browse files
add import acceptance test
1 parent 9a3c9f0 commit b212a40

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

gitlab/resource_gitlab_project_cluster_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,27 @@ func TestAccGitlabProjectCluster_basic(t *testing.T) {
6666
})
6767
}
6868

69+
func TestAccGitlabProjectCluster_import(t *testing.T) {
70+
rInt := acctest.RandInt()
71+
72+
resource.Test(t, resource.TestCase{
73+
PreCheck: func() { testAccPreCheck(t) },
74+
Providers: testAccProviders,
75+
CheckDestroy: testAccCheckGitlabProjectClusterDestroy,
76+
Steps: []resource.TestStep{
77+
{
78+
Config: testAccGitlabProjectClusterConfig(rInt),
79+
},
80+
{
81+
ResourceName: "gitlab_project_cluster.foo",
82+
ImportState: true,
83+
ImportStateVerify: true,
84+
ImportStateVerifyIgnore: []string{"enabled", "kubernetes_token"},
85+
},
86+
},
87+
})
88+
}
89+
6990
type testAccGitlabProjectClusterExpectedAttributes struct {
7091
Name string
7192
EnvironmentScope string

0 commit comments

Comments
 (0)