-
Notifications
You must be signed in to change notification settings - Fork 152
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
change the utility function for getting default repository server CR in unit tests #2170
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
Thanks for submitting this pull request 🎉. The team will review it soon and get back to you. If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document. |
if podName and serviceName are not set even after the polling time exceeds
dc7b0c2
to
804cc77
Compare
9 tasks
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.
LGTM
viveksinghggits
approved these changes
Jul 18, 2023
mabhi
pushed a commit
that referenced
this pull request
Jul 24, 2023
…in unit tests (#2170) * add unit tests for repository server controller * test * add prerequisites for tests * add server ready test * remove unwanted changes * fix lint issues * automate creation of repo server CRD * address review comments * add symbolic link * address comments * remove custom resource * renaming cli to kubecli * add more tests * fix lint issue * Add tests for Immutability Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com> * Fix naming conventions Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com> * Update variables Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com> * add tests related to secrets * add secrets configuration for testutils * add base suite for repository server controller * use constants for location secret keys * add unit tests * make the constants local to the package * add licence headers * change package name * fix build errors * fix licence headers * fix lint issues * remove secret manager changes * remove unused functions and move to next PR * add utility functions * add tests for secrets and cache settings * fix build issues * move secret creation utils under test suite * resolve conflicts * add base suite for repository server controller * use constants for location secret keys * make the constants local to the package * add licence headers * fix licence headers * fix lint issues * remove unused functions and move to next PR * fix build issues * move secret creation utils under test suite * address review comments * add tests which got deleted during rebase * address review comments * updating tests to use the latest changed values for repository server progress field in status * move test utilities to pkg/testutil/testutil.go * rename kopia repository path constant name * improve tests and comments for better readability * refactor repository_test.go and secrets_manager_test.go for better readability * fix tests * test * fix tests * remove unnecessary whitespaces * rename conflicting env variables with s3compliant prefix * uncomment tests * move the env variable related comment at the right place * check error message for immuatability test * address comments related to better readability * change the error message for waitForRepoServerInfoUpdateInCR function * change the default repositoryserver struct from pointer tto local object * change waitForRepoServerInfoUpdateInCR function to return error if podName and serviceName are not set even after the polling time exceeds * fix waitForRepoServerInfoUpdateInCR --------- Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com> Co-authored-by: Rajat Gupta <37516416+r4rajat@users.noreply.github.com> Co-authored-by: Rajat Gupta <rajat.gupta@veeam.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Overview
GetTestKopiaRepositoryServerCR
function was returning a pointer to repository server CR spec. Since the function is getting called in each unit test to get the default CR, any changes made in any test in the spec of the CR were getting reflected in other tests as well since its a pointer to the object. This was failing few tests randomly, this PR changes the removes the pointer from the return typeThis issue was incurred during adding tests in #2146 PR
Please check the type of change your PR introduces:
Issues
Test Plan