-
Notifications
You must be signed in to change notification settings - Fork 22
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
refactor: client.go file helper methods #360
refactor: client.go file helper methods #360
Conversation
Skipping CI for Draft Pull Request. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
==========================================
+ Coverage 13.70% 20.37% +6.67%
==========================================
Files 17 17
Lines 1197 1212 +15
==========================================
+ Hits 164 247 +83
+ Misses 1033 965 -68 ☔ View full report in Codecov by Sentry. |
dc31efd
to
12a8c67
Compare
c2a3bdc
to
3c13bb0
Compare
/retest |
/test e2e-k8s-upgrade |
Thanks for triggering the tests @thunderboltsid, do you think these test failures are related, from the errors it looks like it couldn't delete the old Nodes, is that a known flake? |
The issues stemmed from some older resource from another failed test that were not cleaned up properly that ended up causing IP contention between two separate clusters. |
Let's rebase this PR against the latest changes; I've manually cleaned up the problematic resources so it shouldn't be a problem now. |
97cef1c
to
d4f2b41
Compare
d4f2b41
to
bac3fb4
Compare
/retest |
1 similar comment
/retest |
/lgtm |
d8b6f45
to
b26bd01
Compare
Refactored the existing methods and functions to be unit testable. Also made some methods that do not use the struct as generic functions. The changes were primarily an effort to add unit test coverage.
b26bd01
to
6bbd2e8
Compare
/retest |
/test e2e-capx-controller-upgrade |
3fa9d45
into
nutanix-cloud-native:main
* refactor: client.go file helper methods Refactored the existing methods and functions to be unit testable. Also made some methods that do not use the struct as generic functions. The changes were primarily an effort to add unit test coverage. * refactor: more testable read file function * test: new nutanixcluster types unit tests * test: additional test cases for errors * fixup! refactor: client.go file helper methods * fixup! refactor: client.go file helper methods * fixup! refactor: more testable read file function * fixup! refactor: client.go file helper methods
* refactor: client.go file helper methods (#360) * refactor: client.go file helper methods Refactored the existing methods and functions to be unit testable. Also made some methods that do not use the struct as generic functions. The changes were primarily an effort to add unit test coverage. * refactor: more testable read file function * test: new nutanixcluster types unit tests * test: additional test cases for errors * fixup! refactor: client.go file helper methods * fixup! refactor: client.go file helper methods * fixup! refactor: more testable read file function * fixup! refactor: client.go file helper methods * Ensure fallback config is only read when prismCentral is absent (#403) Skip reading fallback config file from /etc/nutanix/config/prismCentral if NutanixCluster has prismCentral set. Co-authored-by: Sid Shukla <[email protected]> * Update build-dev.yaml add codecov token --------- Co-authored-by: Dimitri Koshkin <[email protected]> Co-authored-by: Deepak Muley <[email protected]>
* refactor: client.go file helper methods Refactored the existing methods and functions to be unit testable. Also made some methods that do not use the struct as generic functions. The changes were primarily an effort to add unit test coverage. * refactor: more testable read file function * test: new nutanixcluster types unit tests * test: additional test cases for errors * fixup! refactor: client.go file helper methods * fixup! refactor: client.go file helper methods * fixup! refactor: more testable read file function * fixup! refactor: client.go file helper methods
* refactor: client.go file helper methods Refactored the existing methods and functions to be unit testable. Also made some methods that do not use the struct as generic functions. The changes were primarily an effort to add unit test coverage. * refactor: more testable read file function * test: new nutanixcluster types unit tests * test: additional test cases for errors * fixup! refactor: client.go file helper methods * fixup! refactor: client.go file helper methods * fixup! refactor: more testable read file function * fixup! refactor: client.go file helper methods
* refactor: client.go file helper methods Refactored the existing methods and functions to be unit testable. Also made some methods that do not use the struct as generic functions. The changes were primarily an effort to add unit test coverage. * refactor: more testable read file function * test: new nutanixcluster types unit tests * test: additional test cases for errors * fixup! refactor: client.go file helper methods * fixup! refactor: client.go file helper methods * fixup! refactor: more testable read file function * fixup! refactor: client.go file helper methods
* fix: improve error handling for Prism Client (#354) * fix: use wrapper errors to clearly denote issues in client building * fix: adds a function to properly sanitize the address * fix: adds tests for ip address case given * fix: uses a defined type for port error * fix: clean up variable naming * fix: remove validation here to be moved into prism-client * refactor: task status file (#355) * test: add unit tests for pkg/client/state * refactor: use wait.Poll function waiting for task state * refactor: use consistent task status names * fixup! test: add unit tests for pkg/client/state * fix: revert to previous behaviod polling forever The ctx passed into WaitForTaskToSucceed is only used to cancel HTTP reqests and not to cancel the wait. * chore: add license headers * fix: better function name * refactor: client.go file helper methods (#360) * refactor: client.go file helper methods Refactored the existing methods and functions to be unit testable. Also made some methods that do not use the struct as generic functions. The changes were primarily an effort to add unit test coverage. * refactor: more testable read file function * test: new nutanixcluster types unit tests * test: additional test cases for errors * fixup! refactor: client.go file helper methods * fixup! refactor: client.go file helper methods * fixup! refactor: more testable read file function * fixup! refactor: client.go file helper methods * Switch Nutanix Client to using Session Auth (#398) This will ensure we make fewer basic auth requests to Prism Central IAM Services. --------- Co-authored-by: Faiq <[email protected]> Co-authored-by: Dimitri Koshkin <[email protected]>
What this PR does / why we need it:
Refactored the existing methods and functions to be unit testable.
Also made some methods that do not use the struct as generic functions.
The changes were primarily an effort to add unit test coverage.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
How Has This Been Tested?:
New unit tests and ran through the dev doc to create a cluster with management creds.
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: