[MAINT] Fix Org Ruleset tests
[!WARNING] This is waiting for https://github.com/integrations/terraform-provider-github/pull/2986 to be merged and rebased to go-github-v68
Resolves #2530, https://github.com/integrations/terraform-provider-github/issues/2536, https://github.com/integrations/terraform-provider-github/issues/2717
Before the change?
- Running
TEST="./github" TESTARGS="-run TestGithubOrganizationRulesets" make testaccwould fail due to multiple issues in the test setup
After the change?
- Running
TEST="./github" TESTARGS="-run TestGithubOrganizationRulesets" make testaccwill show all tests as passing - Switch from
NewSubsystemLoggingHTTPTransporttoNewLoggingHTTPTransportas we don't actually initialize a Subsystem anywhere, which creates spam. - Tests for Organizations properly use
GITHUB_TEST_ORGANIZATIONandGITHUB_TEST_OWNER - Migrate
github/resource_github_organization_ruleset.goandgithub/resource_github_repository.goto use Context aware CRUD methods - Add
rules.pull_requests.allowed_merge_methodshandling togithub/resource_github_repository_ruleset.goandgithub/resource_github_organization_ruleset.go
Pull request checklist
- [ ] ~Schema migrations have been created if needed (example)~
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
- [x] Yes-ish
- [ ] No
The addition of a new required rules property: allowed_merge_methods does kind of constitute a breaking change. It is also entirely necessary as that field isn't omitted by the SDK and it's required by the API.
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
@deiga would it be possible to hold off on this until we get #2941 merged?
@deiga would it be possible to hold off on this until we get #2941 merged?
@stevehipwell Sure! Would you want to rebase that branch on top of go-github-v68, so that I could use it as a base for this PR?
@deiga the acceptance tests PR should be compatible with the v6 releases, so the v7 branch would be rebased on it. I'm currently re-running the tests to get it ready to be merged and I'm picking up defects in the currently released code.