-
Notifications
You must be signed in to change notification settings - Fork 56
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
Test enable and disable dr #1012
Conversation
We keep tinkering on the python script based tests without coming to a conclusion on if we are going to write e2e tests in go or otherwise. This work will hence be a duplicate of the same. @raghavendra-talur and @nirs any idea why we are going down this path...? |
From my point of view, there is no reason to duplicate this test in another way, and this |
I disagree with this statement, what we need from E2E tests is the following:
Using a different language for tests is going to be very detrimental. We will not be able to use the API provided by Ramen directly. We should not be writing glue code to make that happen. We are taxing the new contributors by forcing them to learn two different systems to add even a basic feature. In my opinion, drenv should be limited to only bring up of the test environment, even which I would have preferred to have in go but that ship has sailed. Please don't add any more tests to this directory. |
There is no problem to test more scenarios in the same way we do now.
Testing error paths is not a good idea in system tests in general, unless But regardless testing error paths is not related to how we write the tests.
Good point, but we can have specific tests for the API - these can be very quick
We can test the API as user consume - the resources.
Can you show such code in the current test?
But already need to use python for drenv, ramenctl and the addons scripts, and We can port drenv, ramenctl, and the addons to Go, but I'm not sure this is the best
This is my only way to work on the code now. To work on disable dr, I must When the e2e framework is ready we can port basic-test to it but we are not there yet. |
Example test with the current version and ramen built from #1007
|
@nirs we need to develop and add tests to the e2e framework not in drenv. This only forks the tests and needs to be redone. It is better if this was worked on based on golang based e2e. ramenctl would go the same way BTW, once we move it to a kubectl plugin as discussed earlier. |
I'm not sure the go test framework allows the kind of control the basic test allows. Maybe this is possible, but this requires weeks of development to get back to the current state. Please review the current code and the related ocm-ramen-samples pr, this is needed for testing the disable dr fix. Without this change you need to test manually, something like
ramenctl work only when run in ramen source directory. I'm not sure what it does is good match for a kubectl plugin, but we can rewrite this in Go if it is better for the team. |
921bbb5
to
28052a3
Compare
The way test in upstream is not compatible with the way openshift works. In openshift we install the application using ACM, and then we assign a drpolicy, which adds a drpc resource. Change the example yamls so we can test the same flow in minikube, making upstream flows similar to downstream and possible upstream usage. This way we can also test enabling and disabling DR, which was not tested before. This change should be merged together with this ramen pr: RamenDR/ramen#1012 Signed-off-by: Nir Soffer <[email protected]>
The way test in upstream is not compatible with the way openshift works. In openshift we install the application using ACM, and then we assign a drpolicy, which adds a drpc resource. Change the example yamls so we can test the same flow in minikube, making upstream flows similar to downstream and possible upstream usage. This way we can also test enabling and disabling DR, which was not tested before. This change should be merged together with this ramen pr: RamenDR/ramen#1012 Signed-off-by: Nir Soffer <[email protected]>
c0c78dc
to
b549604
Compare
Documenting latest test version is useful for new contributors or for rebuilding a developer machine. Signed-off-by: Nir Soffer <[email protected]>
We are still using 1.10, updated 6 month ago. Signed-off-by: Nir Soffer <[email protected]>
To dump kubeconfigs on clusters created with the --name-prefix option we need to prefix the cluster names in the environment. The best place to do this is in envfile.load() when we prefix all other names. Without this fix, starting with --name-prefix cannot locate the clusters in the kubeconfig: drenv.commands.Error: Command failed: command: ('kubectl', 'config', '--context', 'hub', 'view', '--flatten', '--minify') exitcode: 1 error: error: cannot locate context hub Signed-off-by: Nir Soffer <[email protected]>
Change the basic test to test the more generic flow - deploying an application using OCM, and enable DR for the deployed application. Finally test disabling DR after the application was failed over and relocated. This change depends on ocm-ramen-samples change splitting the channel and drpc from the subscription. Issues: - Need to split to smaller commits - We test disable dr only in Relocate phase. We will test all disable dr flows in other tests. - With this change we don't test deploy of DR enabled application. We will add another test for this use case. Signed-off-by: Nir Soffer <[email protected]>
b549604
to
e86a192
Compare
Replacing with a cleaner version based on #1056. |
Change the basic test to test the more generic flow - deploying an application using OCM, and enable DR for the deployed application. Finally test disabling DR after the application was failed over and relocated.
This change depends on ocm-ramen-samples change splitting the channel and drpc from the subscription.
Issues:
FailedOver, Relocated)?
this important to test? (looks less useful use case)