provider/github: Creating a github repository before adding a label (#10213)

This commit is contained in:
Paul Stack 2016-11-18 13:38:46 +02:00 committed by GitHub
parent fc3d0f7216
commit dc0cb70e95
1 changed files with 36 additions and 10 deletions

View File

@ -101,17 +101,43 @@ func testAccGithubIssueLabelDestroy(s *terraform.State) error {
}
var testAccGithubIssueLabelConfig string = fmt.Sprintf(`
resource "github_issue_label" "test" {
repository = "%s"
name = "foo"
color = "000000"
}
resource "github_repository" "foo" {
name = "%s"
description = "Terraform acceptance tests!"
homepage_url = "http://example.com/"
# So that acceptance tests can be run in a github organization
# with no billing
private = false
has_issues = false
has_wiki = false
has_downloads = false
}
resource "github_issue_label" "test" {
repository = "${github_repository.foo.name}"
name = "foo"
color = "000000"
}
`, testRepo)
var testAccGithubIssueLabelUpdateConfig string = fmt.Sprintf(`
resource "github_issue_label" "test" {
repository = "%s"
name = "bar"
color = "FFFFFF"
}
resource "github_repository" "foo" {
name = "%s"
description = "Terraform acceptance tests!"
homepage_url = "http://example.com/"
# So that acceptance tests can be run in a github organization
# with no billing
private = false
has_issues = false
has_wiki = false
has_downloads = false
}
resource "github_issue_label" "test" {
repository = "${github_repository.foo.name}"
name = "bar"
color = "FFFFFF"
}
`, testRepo)