Skip to content

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

Closed

Description

@kfcampbell

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

Activity

  1. wwsean08 commented on Jan 4, 2023

    @wwsean08
    Contributor

    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.

  2. kfcampbell commented on Jan 4, 2023

    @kfcampbell
    ContributorAuthor

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

  3. wwsean08 commented on Jan 14, 2023

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

  4. kfcampbell commented on Jan 17, 2023

    @kfcampbell
    ContributorAuthor

    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!

  5. wwsean08 commented on Jan 18, 2023

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

  6. github-actions commented on Apr 20, 2024

    @github-actions

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

  7. added
    Status: PinnedA way to keep old or long lived issues around
    and removed
    Status: StaleUsed by stalebot to clean house
    on Apr 29, 2024
  8. moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Activeon Apr 29, 2024
  9. stevehipwell commented on Nov 26, 2024

    @stevehipwell
    Collaborator

    I've refactored the tests in #2476 to address #2425, hopefully they're easier to understand now and consistent.

  10. moved this from 🔥 Backlog to ✅ Done in 🧰 Octokit Activeon Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: PinnedA way to keep old or long lived issues aroundStatus: Up for grabsIssues that are ready to be worked on by anyoneType: DocumentationImprovements or additions to documentationType: MaintenanceAny dependency, housekeeping, and clean up Issue or PR

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions