Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
jporzucek committed Oct 27, 2023
1 parent 852af9d commit 42b18a0
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion github/resource_github_branch_protection_v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,18 @@ func TestAccGithubBranchProtectionV3_required_pull_request_reviews(t *testing.T)
required_pull_request_reviews {
dismiss_stale_reviews = true
require_code_owner_reviews = true
dismissal_users = ["a"]
dismissal_teams = ["b"]
dismissal_apps = ["c"]
required_approving_review_count = 1
bypass_pull_request_allowances {
users = ["d"]
teams = ["e"]
apps = ["f"]
}
}
}
`, randomID)

check := resource.ComposeAggregateTestCheckFunc(
Expand All @@ -328,6 +336,24 @@ func TestAccGithubBranchProtectionV3_required_pull_request_reviews(t *testing.T)
resource.TestCheckResourceAttr(
"github_branch_protection_v3.test", "required_pull_request_reviews.0.required_approving_review_count", "1",
),
resource.TestCheckResourceAttr(
"github_branch_protection_v3.test", "required_pull_request_reviews.0.dismissal_users", "a",
),
resource.TestCheckResourceAttr(
"github_branch_protection_v3.test", "required_pull_request_reviews.0.dismissal_teams", "b",
),
resource.TestCheckResourceAttr(
"github_branch_protection_v3.test", "required_pull_request_reviews.0.dismissal_apps", "c",
),
resource.TestCheckResourceAttr(
"github_branch_protection_v3.test", "required_pull_request_reviews.0.bypass_pull_request_allowances.users", "d",
),
resource.TestCheckResourceAttr(
"github_branch_protection_v3.test", "required_pull_request_reviews.0.bypass_pull_request_allowances.teams", "e",
),
resource.TestCheckResourceAttr(
"github_branch_protection_v3.test", "required_pull_request_reviews.0.bypass_pull_request_allowances.apps", "f",
),
)

testCase := func(t *testing.T, mode string) {
Expand Down

0 comments on commit 42b18a0

Please sign in to comment.