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

fix: plugin crashed - with nonexistent API server #192

Merged
merged 5 commits into from
Feb 7, 2025
Merged

Conversation

btfhernandez
Copy link
Contributor

@btfhernandez btfhernandez commented Feb 5, 2025

Purpose of the PR

Fix plugin crashed - with nonexistent API server

According to ticket

https://beyondtrust.atlassian.net/browse/BIPS-24883

Summary of changes:

Include validation to avoid nil pointer error in httpclient.go file
Change max file size to 5MB in create file secret flow.
Add unit tests to the completed fixes.

@btfhernandez
Copy link
Contributor Author

btfhernandez commented Feb 7, 2025

@Fcogollo-BT please remove TestClient.go file from coverage reports, that file is a test file and it does not need to be covered.

Could please also give a hand checking https://github.com/BeyondTrust/go-client-library-passwordsafe/actions/runs/13191757353/job/36825869423?pr=192#step:3:22

I'm not sure about why that error is showing.

Thank you!
cc @RanjitMishraBT

Copy link

github-actions bot commented Feb 7, 2025

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/BeyondTrust/go-client-library-passwordsafe 0.00% (ø)
github.com/BeyondTrust/go-client-library-passwordsafe/api/authentication 82.22% (+2.22%) 👍
github.com/BeyondTrust/go-client-library-passwordsafe/api/entities 0.00% (ø)
github.com/BeyondTrust/go-client-library-passwordsafe/api/secrets 89.85% (ø)
github.com/BeyondTrust/go-client-library-passwordsafe/api/utils 31.08% (+0.84%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/BeyondTrust/go-client-library-passwordsafe/TestClient.go 0.00% (ø) 0 0 0
github.com/BeyondTrust/go-client-library-passwordsafe/api/entities/entities.go 0.00% (ø) 0 0 0
github.com/BeyondTrust/go-client-library-passwordsafe/api/utils/httpclient.go 38.84% (+1.38%) 363 (+8) 141 (+8) 222 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/BeyondTrust/go-client-library-passwordsafe/api/authentication/authentication_test.go
  • github.com/BeyondTrust/go-client-library-passwordsafe/api/secrets/secrets_test.go

@btfhernandez btfhernandez merged commit b723ed7 into main Feb 7, 2025
9 of 12 checks passed
@btfhernandez btfhernandez deleted the BIPS-24883 branch February 7, 2025 17:03
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