Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Prefer GH_ENTERPRISE_TOKEN and GITHUB_ENTERPRISE_TOKEN if not a public GitHub host #36

Merged
merged 2 commits into from Jul 12, 2022

Conversation

oalders
Copy link
Contributor

@oalders oalders commented Jul 4, 2022

  • Prefer GH_ENTERPRISE_TOKEN and GITHUB_ENTERPRISE_TOKEN if not a public GitHub host

The enterprise tests are not using Test::Class::Moose because it seems that a skip generated by Test::Needs causes everything in the suite to be skipped. I didn't spend a lot of time on it and I'm not sure there was a lot to be gained via Test::Class::Moose for this simple test.

These results are from running the test suite as it is in this PR with an additional test class which also contains the enterprise tests.

prove -lvr t
t/enterprise.t ............
ok 1 - token
ok 2 - host found via remote
ok 3 - is a ghe host
ok 4 - Pithub args
ok 5 - token
ok 6 - token
ok 7 - no token from GH_TOKEN when URL is GHE
1..7
ok
t/run-test-class-moose.t ..
1..0 # SKIP Need xFile::pushd
skipped: Need xFile::pushd
All tests successful.
Files=2, Tests=7,  7 wallclock secs ( 0.03 usr  0.01 sys +  1.87 cusr  0.63 csys =  2.54 CPU)
Result: PASS

@oalders oalders marked this pull request as ready for review July 6, 2022 17:16
Copy link
Contributor

@PatrickCronin PatrickCronin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on rafl's review.

@PatrickCronin PatrickCronin merged commit 86527b3 into maxmind:main Jul 12, 2022
@oalders oalders deleted the env-vars branch July 12, 2022 15:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants