-
Notifications
You must be signed in to change notification settings - Fork 905
[MAINT] Fix Org Ruleset tests #2976
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
base: go-github-v68
Are you sure you want to change the base?
[MAINT] Fix Org Ruleset tests #2976
Conversation
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
…rks properly Signed-off-by: Timo Sand <[email protected]>
…sport` Updated the logging transport in the RateLimitedHTTPClient function to use NewLoggingHTTPTransport. As the subsystem would need to be explicitly inititated in each resource Signed-off-by: Timo Sand <[email protected]>
By using the `*Context` CRUD functions we get context pass-through and enable HTTP Req/Resp Debug logging Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
It's a required field in the API and go-github doesn't use `omitempty`, so it submits `nil` if it isn't sent explicitly. This change tries to keep it in the state, without having a configuration option for it (poor choice?) And it defaults to all 3 available merge methods if it can't set something from the state. Signed-off-by: Timo Sand <[email protected]>
This is a required field and the SDK doesn't omit if it's empty Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
This enables better debugging during tests as we are able to use get logs for HTTP req/resp Signed-off-by: Timo Sand <[email protected]>
…on_rulesets_without_errors` to pass Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
|
👋 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 |
…null` Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
…_all_bypass_modes` Main fix: `bypass_actors` is returned as sorted from GH API so tests need re-indexing Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
Signed-off-by: Timo Sand <[email protected]>
@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. |
Warning
This is waiting for #2986 to be merged and rebased to go-github-v68
Resolves #2530, #2536, #2717
Before the change?
TEST="./github" TESTARGS="-run TestGithubOrganizationRulesets" make testaccwould fail due to multiple issues in the test setupAfter the change?
TEST="./github" TESTARGS="-run TestGithubOrganizationRulesets" make testaccwill show all tests as passingNewSubsystemLoggingHTTPTransporttoNewLoggingHTTPTransportas we don't actually initialize a Subsystem anywhere, which creates spam.GITHUB_TEST_ORGANIZATIONandGITHUB_TEST_OWNERgithub/resource_github_organization_ruleset.goandgithub/resource_github_repository.goto use Context aware CRUD methodsrules.pull_requests.allowed_merge_methodshandling togithub/resource_github_repository_ruleset.goandgithub/resource_github_organization_ruleset.goPull request checklist
Schema migrations have been created if needed (example)Does this introduce a breaking change?
Please see our docs on breaking changes to help!
The addition of a new required
rulesproperty:allowed_merge_methodsdoes 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.