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

e2e: Prepare for adding test.Env #1769

Merged
merged 7 commits into from
Feb 3, 2025
Merged

e2e: Prepare for adding test.Env #1769

merged 7 commits into from
Feb 3, 2025

Conversation

nirs
Copy link
Member

@nirs nirs commented Jan 26, 2025

Clean up the e2e/util package, preparing for adding test.Env.

  • e2e: Unexport AddNamespaceAnnotationForVolSync
  • e2e: Eliminate the util/crud.go
  • e2e: Move public fuctions to the top
  • e2e: Extract channel related functions to util/channel.go
  • e2e: Rename util/const.go to util/timeout.go
  • e2e: Unexport public single use util contants
  • e2e: Move private config constant to config

Part-of #1715

@nirs nirs mentioned this pull request Jan 26, 2025
8 tasks
@nirs nirs marked this pull request as draft January 28, 2025 00:14
@nirs

This comment was marked as outdated.

Copy link
Member

@parikshithb parikshithb left a comment

Choose a reason for hiding this comment

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

Looks good!

nirs added 7 commits January 29, 2025 23:28
We want to make the config accessing from the test context, and possibly
move it around. Having related stuff in the same file makes it easier to
work with the code.

Signed-off-by: Nir Soffer <[email protected]>
- Make util.RamenOpsNamespace private constant of the discoveredapp
  deployer
- Make util.ArgocdNamespace private constant of the applicatioset
  deployer
- Make util.RamenNamespace private constant of validation file

Signed-off-by: Nir Soffer <[email protected]>
The only constants left are timeouts, so we can have a more meaningful
name.

Signed-off-by: Nir Soffer <[email protected]>
We need to create a channel before running tests using subscriptions or
applicationset, and delete it at the end. This code seems like part of
the deployers pacakge. To move it we need to uncouple it from the util
package. The first step is move the related code to a new file.

Signed-off-by: Nir Soffer <[email protected]>
We don't have ordering dependencies in Go so we can keep the public
names at the start of the file for easier navigation.

Signed-off-by: Nir Soffer <[email protected]>
Split out the drpolicy function to drpolicy.go and rename the file to
namespace.go. Now we can understand better the structure of the util
package.

Signed-off-by: Nir Soffer <[email protected]>
It is used only in CreateNamespaceAndAnnotation, lets keep it private to
avoid future dependencies.

Part-of: RamenDR#1715
Signed-off-by: Nir Soffer <[email protected]>
@nirs nirs requested a review from ELENAGER January 30, 2025 12:48
@nirs nirs merged commit 09c85f3 into RamenDR:main Feb 3, 2025
23 checks passed
@nirs nirs deleted the e2e-env-prep branch February 3, 2025 12:52
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