func/test
Matej Vasek efb04bef0f
Use custom jammy paketo builder (#1911)
* chore: use custom jammy paketo builder

Use our own modified jammy builder with additional buildpacks for
GoFunc and Rust. This enables on cluster build for Go and Rust functions.
Where possible (Go, Java) we use "tiny" variant, other runtimes use "base"
variant.

The updated task is new file instead of modifying existing task
this is done for sake of keeping compatiblility.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: remove unnecessary code per review request

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: podman test refers correct tkn task yamls

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-10 03:25:35 +00:00
..
common Fix pod security context (#1889) 2023-07-26 20:03:41 +00:00
e2e Use custom jammy paketo builder (#1911) 2023-08-10 03:25:35 +00:00
oncluster Use custom jammy paketo builder (#1911) 2023-08-10 03:25:35 +00:00
testhttp e2e tests restructuring / refactoring (#1615) 2023-03-16 20:52:59 +00:00
README.md chore: remove underscore prefix from test packages (#1503) 2023-01-20 09:01:02 +00:00
e2e_extended_tests.sh e2e tests restructuring / refactoring (#1615) 2023-03-16 20:52:59 +00:00
e2e_lifecycle_tests.sh e2e tests restructuring / refactoring (#1615) 2023-03-16 20:52:59 +00:00
e2e_oncluster_tests.sh chore: coverage for e2e tests (#1603) 2023-03-08 17:53:20 +00:00
gitserver.sh test: oncluster build initial e2e set of tests (#1193) 2022-09-05 13:08:22 +00:00
patch_network.sh ci: implementation proposal for func e2e test (#363) 2021-06-02 09:43:04 +02:00
presubmit-tests.sh chore: refer correct tkn yaml in prow test (#1918) 2023-08-09 20:56:35 +00:00

README.md

Functions E2E Test

Lifecycle tests

Lifecycle tests exercises the most important phases of a function lifecycle starting from creation, going thru to build, deployment, execution and then deletion (CRUD operations). It runs func commands such as create, deploy, list and delete for a language runtime using both default http and cloudevents templates.

Extended tests

Extended tests performs additional tests on func such as templates, config envs, volumes, labels and other scenarios.

On Cluster Builds tests

On cluster builds e2e tests exercises functions built directly on cluster. The tests are organized per scenarios under ./oncluster folder.

Pre-requisites

Prior to run On Cluster builds e2e tests ensure you are connected to a Kubernetes Cluster with the following deployed:

  • Knative Serving
  • Tekton
  • Tekton Tasks listed here
  • Embedded Git Server (func-git) used by tests

For your convenience you can run the following script to setup Tekton and required Tasks:

$ ./hack/tekton.sh

To install the Git Server required by tests, run:

$ ./gitserver.sh

Running all the Tests on KinD

The below instructions will run all the tests on KinD using an ephemeral container registry.

# Pre-Reqs
./hack/allocate.sh
./hack/tekton.sh
./test/gitserver.sh
make build

# Run tests
./test/e2e_oncluster_tests.sh

Running "runtime" only scenario

You can run only e2e tests to exercise a given language/runtime, for example python

env E2E_RUNTIMES=python TEST_TAGS=runtime ./test/e2e_oncluster_tests.sh

Running tests except "runtime" ones

You can run most of on cluster builds e2e scenarios, except the language/runtime specific ones, by running:

env E2E_RUNTIMES="" ./test/e2e_oncluster_tests.sh