-
Notifications
You must be signed in to change notification settings - Fork 81
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
Configure E2E test setup on PAC for bitbucket server #1820
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1820 +/- ##
==========================================
+ Coverage 65.34% 65.35% +0.01%
==========================================
Files 177 177
Lines 13594 13594
==========================================
+ Hits 8883 8885 +2
+ Misses 4119 4117 -2
Partials 592 592 ☔ View full report in Codecov by Sentry. |
213bdab
to
cbaa344
Compare
configured e2e test for bitbucket server on PAC and wrote one test for pull request. https://issues.redhat.com/browse/SRVKP-6758 Signed-off-by: Zaki Shaikh <[email protected]>
github.com/bradleyfalzon/ghinstallation/v2 v2.11.0 | ||
github.com/cloudevents/sdk-go/v2 v2.15.2 | ||
github.com/fvbommel/sortorder v1.1.0 | ||
github.com/gdasson/bitbucketv1go v1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a new bibtubkcet library ? we are having two library to interact with bbv1, that's going to be a burden in the future, any chance to only use one (either one) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chmouel yes, then we need to use this new one everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the work hard to do ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hard to do
No, FYI there will be many changes in bitbucket server provider implementation. bitbucketserver.go
@@ -8,9 +8,11 @@ require ( | |||
code.gitea.io/gitea v1.22.1 | |||
code.gitea.io/sdk/gitea v0.19.0 | |||
github.com/AlecAivazis/survey/v2 v2.3.7 | |||
github.com/antihax/optional v1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this library is good for ? (we need to be careful which lib we want to add to the project, everything has a cost)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chmouel it's underline dependency for gdasson/bitbucketv1go
(used here in my PR)
if prID != -1 { | ||
runcnx.Clients.Log.Infof("Deleting PR #%d", prID) | ||
_, err := bprovider.Client.DefaultApi.DeletePullRequest(opts.Organization, opts.Repo, int(prID)) | ||
assert.NilError(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add some fmt.Errorf("%w") wrapping with a descriptive error message ? (on all those errors), i think this would make easier when it fail
configured e2e test for bitbucket server on PAC and wrote one test for pull request.
https://issues.redhat.com/browse/SRVKP-6758
Changes
Submitter Checklist
📝 Please ensure your commit message is clear and informative. For guidance on crafting effective commit messages, refer to the How to write a git commit message guide. We prefer the commit message to be included in the PR body itself rather than a link to an external website (ie: Jira ticket).
♽ Before submitting a PR, run make test lint to avoid unnecessary CI processing. For an even more efficient workflow, consider installing pre-commit and running pre-commit install in the root of this repository.
✨ We use linters to maintain clean and consistent code. Please ensure you've run make lint before submitting a PR. Some linters offer a --fix mode, which can be executed with the command make fix-linters (ensure markdownlint and golangci-lint tools are installed first).
📖 If you're introducing a user-facing feature or changing existing behavior, please ensure it's properly documented.
🧪 While 100% coverage isn't a requirement, we encourage unit tests for any code changes where possible.
🎁 If feasible, please check if an end-to-end test can be added. See README for more details.
🔎 If there's any flakiness in the CI tests, don't necessarily ignore it. It's better to address the issue before merging, or provide a valid reason to bypass it if fixing isn't possible (e.g., token rate limitations).