-
Notifications
You must be signed in to change notification settings - Fork 105
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 e2e test by using some common functions #100
Comments
I spoke with @zhangtbj on this, I think being able to specify which strategies to run during e2e tests isn´t ideal, e2e tests should run everything. In the meantime, we can live with a minor patch from our side to disable the two strategies we cannot run successfully(buildah and s2i). However, I think we would like to have the flexibility to avoid running the following pieces during e2e tests, due to our specific tenant environments and the way where we run components:
All of the above can be done with a new env variable, I can do this easily(I think), @sbose78 pls let us know what u think. With this we will only patch to skip those two strategies, and once we resolved the issues, we will not longer need to patch anything. Also, this will not break your setup. |
@sbose78 let me know about the above. |
If I understand this correctly,
Can we make our tests resilient enough to understand that specific validations may be skipped? Which user do you run these tests as in your internal environment?
|
Agree. Because our Production system is ready and deployed at the beginning (build controller and cluster build strategies). So every time, we just need to update the controller and re-run the e2e tests.
|
But .... It issues is used to extract the current test code as the I think later, we can create a new issue to separate these two requirements. |
This basic requirement is resolved by using this PR: Close this first and will open the advanced issue for the new requirement. Thanks! |
1, In the current e2e test framework, we run each test one by one and most of the code can be extracted as a common function:
https://github.com/redhat-developer/build/blob/master/test/e2e/main_test.go#L82-L110
The background behind this issue is: Right now, in our tenant environment, we only provide kaniko and buildpacks build strategies (buildah requires privileged permission which is not allowed in our env)
So we require to just run kaniko and buildpacks e2e tests.
So we would like to extract the common test code as a shared function like:
So that we can refine the e2e test code and disable any one easily like:
And we pre-install the ClusterBuildStrategies on the env first, also we also need to find a way to skip the
createClusterBuildStrategy(t, ctx, f, oE.clusterBuildStrategy)
step.2, And we also would like to create a new function to include those schema validation:
https://github.com/redhat-developer/build/blob/master/test/e2e/main_test.go#L30-L53
Let me know if you have any comment. @sbose78 and @qu1queee
The text was updated successfully, but these errors were encountered: