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

[MAINT]: Document (and automate?) required resources to run integration tests #1414

Open
1 task done
kfcampbell opened this issue Dec 6, 2022 · 6 comments
Open
1 task done
Labels
Status: Pinned A way to keep old or long lived issues around Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR

Comments

@kfcampbell
Copy link
Member

Describe the need

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.

SDK Version

all versions

API Version

N/A

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation Priority: Normal Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR labels Dec 6, 2022
@wwsean08
Copy link
Contributor

wwsean08 commented 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.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.

@kfcampbell
Copy link
Member Author

<3 <3 <3 that would be wonderful @wwsean08! Your plan sounds excellent.

@wwsean08
Copy link
Contributor

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.

@kfcampbell
Copy link
Member Author

is there any way to determine if an account is an enterprise account?

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.

If it is possible it might be worth adding special "enterprise" type tests.

I agree; I think this would be super worthwhile!

@wwsean08
Copy link
Contributor

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.

Copy link

👋 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!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Apr 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
@kfcampbell kfcampbell added Status: Pinned A way to keep old or long lived issues around and removed Status: Stale Used by stalebot to clean house labels Apr 29, 2024
@kfcampbell kfcampbell reopened this Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pinned A way to keep old or long lived issues around Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
None yet
Development

No branches or pull requests

3 participants