-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add integration-test in the Build #322
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
Comments
qu1queee
added
the
kind/feature
Categorizes issue or PR as related to a new feature.
label
Jul 31, 2020
Merged
I will be working on this soonish! |
qu1queee
added a commit
to qu1queee/build
that referenced
this issue
Aug 21, 2020
qu1queee
added a commit
to qu1queee/build
that referenced
this issue
Sep 1, 2020
qu1queee
added a commit
to qu1queee/build
that referenced
this issue
Sep 9, 2020
qu1queee
added a commit
to qu1queee/build
that referenced
this issue
Sep 14, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is about adding support for integration tests in the Build.
Currently we have two types of testing(unit and e2e tests):
unit-test allow us to mock the behaviors of the controllers during Reconciliation. For example if the
BuildRun
controller triggers a reconcile because a new BuildRun resource was created, the unit-tests allow us to ensure the code we have during reconciliation is doing what is expected to do. Unit-tests also help us to mock the output of some of our public functions, e.g. when we create aTaskRun
object. What we cannot do with unit-tests is to test continuous interaction of several components, for examplecreating a Build -> creating a BuildRun -> creating a TaskRun -> deleting a Build
. Or the behaviour of the BuildRuns during deletion when we set a particular annotation in the Build. In general all features that can be executed viakubectl
.e2e tests are already in place to test most of the behaviors from creation of a Build until a docker image is pushed to X registry(end-to-end behaviour of the system), also should be the last step to ensure stability on the system. e2e should stay the way they are implemented, by only testing the whole flow. What is required to cover in e2e tests is the ability to build images with different strategies(we already do this) and the ability to build images with particular strategies but using different source code examples(we already do this) . While the idea of e2e tests is to be really close to a production environment, we might consider to modify our current implementation to use a more ad-hoc deployment of the operator via our yamls(we actually do not use this file https://github.com/redhat-developer/build/tree/master/deploy to start the operator), but we rather start the operator directly by starting the operator locally. We might also consider to extend e2e to also cover the part of using the
build image
to deploy apod spec
orknative svc
.From the above test approaches, we need a more fine-grained way of testing most of our main features on a Kubernetes cluster, which can be features that the user can enable/disable by triggering
kubectl
commands. For example:The above is a use case that should not belong to e2e tests(this usecase is only about testing the interactions between components) , and that would be hard to properly test with unit-tests(not ideal while we want to use a k8s based env for testing).
A set of features we need to start testing via integration tests would be:
build.build.dev/build-run-deletion
annotationbuild.build.dev/build-run-deletion
annotation.Also, any new upcoming feature:
Around the integration-test implementation:
@sbose78 during last community meeting I briefly mentioned this topic, please take a look.
The text was updated successfully, but these errors were encountered: