test: add conditional GitHub integration tests#2210
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2210 +/- ##
==========================================
+ Coverage 83.81% 83.92% +0.10%
==========================================
Files 93 93
Lines 9357 9463 +106
==========================================
+ Hits 7843 7942 +99
- Misses 1168 1175 +7
Partials 346 346 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JoeWang1127
left a comment
There was a problem hiding this comment.
Can we close the test pull request and remove the branch as a clean up of the tests?
Not unless we add more GitHub API calls that we want to maintain. Currently, running these tests is manual. If/when we want to programatically run these against a test repo, we can look into that. |
Will add new ClosePullRequest() and use in the cleanup in a follow up PR to avoid putting new features in this test PR |
test: update system test to clean up branch and close the pull request. Followup to #2210 that cleans up the branch we created and closes the pull request. Towards #300 Signed-off-by: Jeff Ching <[email protected]>
Towards #300 Usage: ```bash TEST_GITHUB_TOKEN=<your-token> \ TEST_GITHUB_REPOSITORY=<target-repo> \ go test -v system_test.go ``` If you do not provide a `TEST_GITHUB_TOKEN`, none of the tests run. If you do not provide a `TEST_GITHUB_REPOSITORY` repository, then the pull request creation/edit tests do not run.
test: update system test to clean up branch and close the pull request. Followup to #2210 that cleans up the branch we created and closes the pull request. Towards #300 Signed-off-by: Jeff Ching <[email protected]>
Towards #300
Usage:
If you do not provide a
TEST_GITHUB_TOKEN, none of the tests run. If you do not provide aTEST_GITHUB_REPOSITORYrepository, then the pull request creation/edit tests do not run.