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

Complete auth support #8

Merged
merged 4 commits into from
Jan 21, 2022
Merged

Complete auth support #8

merged 4 commits into from
Jan 21, 2022

Conversation

medegw01
Copy link
Contributor

@medegw01 medegw01 commented Jan 18, 2022

Description

This PR adds unit tests to the authorization module and k8s package

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#159

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Added unit tests and manually run code

@medegw01 medegw01 force-pushed the complete-auth-support branch from 151fef5 to dbe7c9d Compare January 18, 2022 16:20
@tdawe
Copy link
Collaborator

tdawe commented Jan 18, 2022

Linting errors are failing the action. Also, update the GitHub Issue in the description to dell/csm#159

@medegw01
Copy link
Contributor Author

Linting errors are failing the action. Also, update the GitHub Issue in the description to dell/csm#159

resolved

return fmt.Errorf("CSM Authorization does not support %s driver", driverType)
}

// check if provided version is supported
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we support the case where I specify a version of the PowerScale driver but don't specify the version of Authorization? In that case, the operator should know which version of Authorization should be used based on our support matrix.

Copy link
Contributor Author

@medegw01 medegw01 Jan 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the default behavior I am testing. Please see the test file: https://github.com/dell/csm-operator/blob/complete-auth-support/pkg/modules/testdata/cr_powerscale_auth.yaml and corresponding prechecks testing it:

func TestAuthorizationPrecheck(t *testing.T) {

And finally, here is the line in the code that calls the default:

if authConfigVersion == "" {

@medegw01 medegw01 requested a review from tdawe January 20, 2022 15:36
@medegw01 medegw01 merged commit 598c1f3 into main Jan 21, 2022
nb950 pushed a commit that referenced this pull request Jan 21, 2022
* Adding Unit teste

* resolve golinbt issues
@medegw01 medegw01 deleted the complete-auth-support branch January 24, 2022 16:35
nb950 added a commit that referenced this pull request Jan 24, 2022
* update reconcile to use workque , predicate
add watch on daemonset
refactor to use apply for daemonset
test apply change on cr for daemonset
remove kubernetes module in go.mod

* Complete auth support (#8)

* Adding Unit teste

* resolve golinbt issues

* fix merge conflicts

* update authorization helper to use apply for daemonset

* fix auth test type errors

* actions need container built with golang:1.17

* set go.mod controller-runtime to 0.10.3 , 0.11.0 fails to build with actions image-scanner

* remove comments on calls where type changed

Co-authored-by: Michael Edegware <[email protected]>
ChristianAtDell added a commit that referenced this pull request Oct 15, 2024
* Adding Unit teste

* resolve golinbt issues
ChristianAtDell added a commit that referenced this pull request Oct 15, 2024
* update reconcile to use workque , predicate
add watch on daemonset
refactor to use apply for daemonset
test apply change on cr for daemonset
remove kubernetes module in go.mod

* Complete auth support (#8)

* Adding Unit teste

* resolve golinbt issues

* fix merge conflicts

* update authorization helper to use apply for daemonset

* fix auth test type errors

* actions need container built with golang:1.17

* set go.mod controller-runtime to 0.10.3 , 0.11.0 fails to build with actions image-scanner

* remove comments on calls where type changed

Co-authored-by: Michael Edegware <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants