Conversation
|
There are some integration tests failing for IRepoCollaboratorsClient's GetAll method. The tests are adding a collaborator and expecting the collaborator count to be updated. However, adding a collaborator will send an invitation and the collaborator has to accept the invitation before the count will be updated. The integration tests for ReviewPermission also follow the same route, a collaborator is added with 'write' permission and the test expects a collaborator with 'write' permission, without waiting for the collaborator to accept the invitation. In these tests octokitnet-test1 and m-zuber-octokit-integration-tests accounts are used for adding a collaborator, and I don't have their creds to accept the invitation. This probably is out of scope for this issue, but we probably should create a new issue and think about possible workarounds. For app installation permissions, there are some permissions that have only 'read' as a value, some have only 'write', most with 'read' and 'write', and some with 'read', 'write' and 'admin'. I have named the enums InstallationReadPermissionLevel, InstallationWritePermissionLevel, InstallationReadWritePermissionLevel, and InstallationReadWriteAdminPermissionLevel respectively. I have also moved the Permission.cs to the common folder because it houses all the permissions from the API surface. |
|
@notauserx is the |
|
The integration testing question with the invites is a tough one. As far as I know, we don't have a convenient way to do that. I'll have to think about that more and ask my team. |
|
Hey @notauserx, Thanks again for these contributions ❤️ . As you've detailed above, we need to rethink some of the strategies in our integration tests. I cannot be 100% certain, but the workflow for the ones you referenced has changed since they were originally implemented. We have a few options here:
I don't want to get into philosophical aspects of how useful functional tests are - especially since there is already pretty good unit test coverage on I appreciate you highlighting this fragile part of this SDK's coverage. We're working daily to try to improve this for everyone, and I'm glad you've decided to come alongside us and do the same ❤️ ! |
|
@nickfloyd thank you for sharing your thoughts. Among the options you suggested, I am more biased toward either removing or skipping the failing tests. I do understand that with GitHub updating their REST APIs, there will be times when this SDK gets out of sync, and with breaking changes and workflow updates some workflows do get outdated. I will think through your suggestions and incorporate them into this PR, which I plan to resume next week. And for the contributions, I am glad to offer my PRs. |
|
This PR is now ready for review. Please give me some feedback and I will update the PR accordingly. |
nickfloyd
left a comment
There was a problem hiding this comment.
Thank you for getting this in ❤️
Resolves #2323
Behavior
Before the change?
After the change?
Additional info
Pull request checklist
Does this introduce a breaking change?
Type: Breaking changelabel)If
Yes, what's the impact:Pull request type
Type: BugType: Breaking Change