Skip to content

Commit 17de2da

Browse files
author
Jordan Caussat
committed
Add data source users tests
1 parent b22d6fa commit 17de2da

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package gitlab
2+
3+
import (
4+
"regexp"
5+
"testing"
6+
7+
"github.com/hashicorp/terraform/helper/resource"
8+
)
9+
10+
func TestAccDataSourceGitlabUsers_basic(t *testing.T) {
11+
resource.Test(t, resource.TestCase{
12+
PreCheck: func() { testAccPreCheck(t) },
13+
Providers: testAccProviders,
14+
Steps: []resource.TestStep{
15+
resource.TestStep{
16+
Config: testAccComputeLbIpRangesConfig,
17+
Check: resource.ComposeTestCheckFunc(
18+
resource.TestMatchResourceAttr("data.gitlab_users.test",
19+
"users.#", regexp.MustCompile("^[1-9]*$"))),
20+
},
21+
},
22+
})
23+
}
24+
25+
const testAccComputeLbIpRangesConfig = `
26+
data "gitlab_users" "test" {}
27+
`

0 commit comments

Comments
 (0)