Skip to content

Commit 544465a

Browse files
committed
Ensure max_retries is actually tested
Signed-off-by: Timo Sand <[email protected]>
1 parent bb89bf7 commit 544465a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

github/provider_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,15 @@ func TestAccProviderConfigure(t *testing.T) {
173173
})
174174

175175
t.Run("can be configured with max retries", func(t *testing.T) {
176+
testMaxRetries := -1
176177
config := fmt.Sprintf(`
177178
provider "github" {
178179
owner = "%s"
179-
max_retries = 3
180-
}`, testAccConf.owner)
180+
max_retries = %d
181+
}
182+
183+
data "github_ip_ranges" "test" {}
184+
`, testAccConf.owner, testMaxRetries)
181185

182186
resource.Test(t, resource.TestCase{
183187
PreCheck: func() { skipUnauthenticated(t) },
@@ -186,6 +190,7 @@ func TestAccProviderConfigure(t *testing.T) {
186190
{
187191
Config: config,
188192
ExpectNonEmptyPlan: false,
193+
ExpectError: regexp.MustCompile("max_retries must be greater than or equal to 0"),
189194
},
190195
},
191196
})

0 commit comments

Comments
 (0)