Skip to content

Commit ac97cf8

Browse files
committed
Update test to show that topic updates work as well
Signed-off-by: Timo Sand <[email protected]>
1 parent 62df514 commit ac97cf8

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

github/resource_github_repository_test.go

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -393,20 +393,29 @@ func TestAccGithubRepository(t *testing.T) {
393393
}
394394
`, testRepoName)
395395

396-
check := resource.ComposeTestCheckFunc(
397-
resource.TestCheckResourceAttr(
398-
"github_repository.test", "topics.#",
399-
"2",
400-
),
401-
)
402-
403396
resource.Test(t, resource.TestCase{
404397
PreCheck: func() { skipUnauthenticated(t) },
405398
ProviderFactories: providerFactories,
406399
Steps: []resource.TestStep{
407400
{
408401
Config: config,
409-
Check: check,
402+
Check: resource.ComposeTestCheckFunc(
403+
resource.TestCheckResourceAttr(
404+
"github_repository.test", "topics.#",
405+
"2",
406+
),
407+
),
408+
},
409+
{
410+
Config: strings.Replace(config,
411+
`topics = ["terraform", "testing"]`,
412+
`topics = ["terraform", "testing", "extra-topic"]`, 1),
413+
Check: resource.ComposeTestCheckFunc(
414+
resource.TestCheckResourceAttr(
415+
"github_repository.test", "topics.#",
416+
"3",
417+
),
418+
),
410419
},
411420
},
412421
})

0 commit comments

Comments
 (0)