You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MAINT]: Document (and automate?) required resources to run integration tests #1414
Currently, our unit tests expect a variety of prerequisites to avoid skipping and run successfully. These include:
An organization and a user account
A template repository inside the organization
A GitHub App installed at the organization level
The GitHub App installed on at least one repo and the installation ID exported to a particular environment variable
The above list is non-exhaustive. When this issue is closed, we should at a minimum have documented all the criteria required to run unit tests. We should also have evaluated whether it's worth automating the creation of the prerequisites.
I'll do my best to work on untangling this over the next couple of weeks unless someone is actively working on it. My plan is to create a TESTING.md file which can be linked to in CONTRIBUTING.md. Long term that document can possibly include testing procedures, standards, and things of that nature.
Quick question, is there any way to determine if an account is an enterprise account? TestAccGithubOrganizationIpAllowListDataSource/queries_without_error/with_an_organization_account this test manages an IP allow list which is limited to enterprise accounts? If it is possible it might be worth adding special "enterprise" type tests.
Turns out there actually is an enterprise constant and I just missed it, so I'll look at fixing the tests that are enterprise dependent. I wasn't using my terminology correctly as I meant an org is enterprise, but it seems like we've got this resolved at this point.
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
Activity
wwsean08 commentedon Jan 4, 2023
I'll do my best to work on untangling this over the next couple of weeks unless someone is actively working on it. My plan is to create a
TESTING.mdfile which can be linked to inCONTRIBUTING.md. Long term that document can possibly include testing procedures, standards, and things of that nature.kfcampbell commentedon Jan 4, 2023
<3 <3 <3 that would be wonderful @wwsean08! Your plan sounds excellent.
wwsean08 commentedon Jan 14, 2023
Quick question, is there any way to determine if an account is an enterprise account?
TestAccGithubOrganizationIpAllowListDataSource/queries_without_error/with_an_organization_accountthis test manages an IP allow list which is limited to enterprise accounts? If it is possible it might be worth adding special "enterprise" type tests.kfcampbell commentedon Jan 17, 2023
I'm not aware of anything, unfortunately. Perhaps it would be possible to figure this out through the Get the authenticated user endpoint, or the Return all of the user's organization memberships workflow.
I agree; I think this would be super worthwhile!
wwsean08 commentedon Jan 18, 2023
Turns out there actually is an
enterpriseconstant and I just missed it, so I'll look at fixing the tests that are enterprise dependent. I wasn't using my terminology correctly as I meant an org is enterprise, but it seems like we've got this resolved at this point.github-actions commentedon Apr 20, 2024
👋 Hey Friends, this issue has been automatically marked as
stalebecause it has no recent activity. It will be closed if no further activity occurs. Please add theStatus: Pinnedlabel if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!stevehipwell commentedon Nov 26, 2024
I've refactored the tests in #2476 to address #2425, hopefully they're easier to understand now and consistent.