Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix restrict pushes on github_branch_protection. Fix branch protection tests #2045

Merged
merged 11 commits into from
Feb 2, 2024
Prev Previous commit
Next Next commit
Pass context.Background() in test
kfcampbell committed Jan 22, 2024
commit 393bf881051926271dc4ed5f398c207dc0be8f20
3 changes: 2 additions & 1 deletion github/resource_github_branch_protection_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package github

import (
"context"
"fmt"
"reflect"
"regexp"
@@ -912,7 +913,7 @@ func testGithubBranchProtectionStateDataV2() map[string]interface{} {

func TestAccGithubBranchProtectionV4StateUpgradeV1(t *testing.T) {
expected := testGithubBranchProtectionStateDataV2()
actual, err := resourceGithubBranchProtectionUpgradeV1(nil, testGithubBranchProtectionStateDataV1(), nil)
actual, err := resourceGithubBranchProtectionUpgradeV1(context.Background(), testGithubBranchProtectionStateDataV1(), nil)
if err != nil {
t.Fatalf("error migrating state: %s", err)
}