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

chore: Set GITHUB_TOKEN in the test container #9317

Merged
merged 2 commits into from May 7, 2022

Conversation

jannfis
Copy link
Member

@jannfis jannfis commented May 6, 2022

The ApplicationSet end-to-end tests need to have GITHUB_TOKEN set, so that the tests do not run into the unauthenticated rate limiting of GitHub.

Note GITHUB_TOKEN needs to be properly exported in the env.

Signed-off-by: jannfis jann@mistrust.net

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

Signed-off-by: jannfis <jann@mistrust.net>
@rishabh625
Copy link
Contributor

@jannfis: working on removing calls to external git provider so token will not be needed for UT, but yeah for E2E requires but that is fetched from secrets

@rishabh625
Copy link
Contributor

@jannfis: working on removing calls to external git provider so token will not be needed for UT, but yeah for E2E requires but that is fetched from secrets

Not sure for E2E

@jannfis
Copy link
Member Author

jannfis commented May 6, 2022

@rishabh625 This is for running the tests locally, not on the CI :)

@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #9317 (e3294f1) into master (f9d65dd) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #9317      +/-   ##
==========================================
- Coverage   46.06%   46.04%   -0.02%     
==========================================
  Files         217      217              
  Lines       25912    25912              
==========================================
- Hits        11936    11931       -5     
- Misses      12319    12323       +4     
- Partials     1657     1658       +1     
Impacted Files Coverage Δ
applicationset/services/scm_provider/github.go 75.29% <0.00%> (-5.89%) ⬇️
util/settings/settings.go 48.16% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9d65dd...e3294f1. Read the comment docs.

@34fathombelow
Copy link
Member

@jannfis I was under the impression that a GITHUB_TOKEN was only auto-generated during the run of a workflow only. Would a end user have to use a PAT? Let me know if I'm missing something

Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

LGTM

@rishabh625
Copy link
Contributor

@jannfis I was under the impression that a GITHUB_TOKEN was only auto-generated during the run of a workflow only. Would a end user have to use a PAT? Let me know if I'm missing something

I think u need to set variable to run test locally else test skips, take a look at pull request generator test

so it's good to have this var

@jannfis jannfis merged commit a8e6e40 into argoproj:master May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants