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

Configure E2E test setup on PAC for bitbucket server #1820

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zakisk
Copy link
Contributor

@zakisk zakisk commented Nov 12, 2024

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).

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.35%. Comparing base (2609b4b) to head (f515e53).
Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@zakisk zakisk force-pushed the SRVKP-6758 branch 6 times, most recently from 213bdab to cbaa344 Compare November 14, 2024 04:37
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
Copy link
Member

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) ?

Copy link
Contributor Author

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.

Copy link
Member

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 ?

Copy link
Contributor Author

@zakisk zakisk Nov 19, 2024

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
Copy link
Member

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)

Copy link
Contributor Author

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)
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants