Skip to content

Commit

Permalink
provider/github: Creating a github repository before adding a label (h…
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 authored and Gustavo Mateus committed Dec 6, 2016
1 parent 21b47ac commit a25733b
Showing 1 changed file with 36 additions and 10 deletions.
46 changes: 36 additions & 10 deletions builtin/providers/github/resource_github_issue_label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit a25733b

Please sign in to comment.