Skip to content

Commit bb89bf7

Browse files
committed
Ensure max_per_page test actually runs
Signed-off-by: Timo Sand <[email protected]>
1 parent b6c3795 commit bb89bf7

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

github/provider_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,15 @@ func TestAccProviderConfigure(t *testing.T) {
192192
})
193193

194194
t.Run("can be configured with max per page", func(t *testing.T) {
195-
config := `
195+
testMaxPerPage := 101
196+
config := fmt.Sprintf(`
196197
provider "github" {
197198
owner = "%s"
198-
max_per_page = 100
199-
}`
199+
max_per_page = %d
200+
}
201+
202+
data "github_ip_ranges" "test" {}
203+
`, testAccConf.owner, testMaxPerPage)
200204

201205
resource.Test(t, resource.TestCase{
202206
PreCheck: func() { skipUnauthenticated(t) },
@@ -206,8 +210,8 @@ func TestAccProviderConfigure(t *testing.T) {
206210
Config: config,
207211
ExpectNonEmptyPlan: false,
208212
Check: func(_ *terraform.State) error {
209-
if maxPerPage != 100 {
210-
return fmt.Errorf("max_per_page should be set to 100, got %d", maxPerPage)
213+
if maxPerPage != testMaxPerPage {
214+
return fmt.Errorf("max_per_page should be set to %d, got %d", testMaxPerPage, maxPerPage)
211215
}
212216
return nil
213217
},

0 commit comments

Comments
 (0)