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

Setup e2e tests #694

Closed
hbagdi opened this issue May 21, 2020 · 1 comment · Fixed by #869
Closed

Setup e2e tests #694

hbagdi opened this issue May 21, 2020 · 1 comment · Fixed by #869

Comments

@hbagdi
Copy link
Member

hbagdi commented May 21, 2020

Currently, the tests written in the controller codebase test the controller itself but we do not perform a full integration of the controller with a k8s setup and Kong running with it.
Setup a simple and maintainable test setup to run automated e2e test.

@StarpTech
Copy link

This is a very important issue because I think it's the major reason why knative integration is currently broken.

This also prevents me from using the controller in production.

@hbagdi hbagdi added this to the 1.1.0 milestone Sep 11, 2020
@mflendrich mflendrich self-assigned this Sep 21, 2020
mflendrich added a commit that referenced this issue Nov 2, 2020
fixes #694 

- makes CI build a local KIC image from HEAD
- if on `main` or `next`: pushes to bintray. Can (or, maybe, should) be extended to all pushes
- spins up a local microk8s cluster
- pushes the local KIC to the local image registry
- runs an instance of KIC
- runs a set of tests: applying a bunch of manifests, waiting (open loop - `sleep 6`) for KIC to do its work, asserting on `curl` results
    - There are several possible ways to mitigate the `sleep` but none of them is perfect:
        - watch the `status` field of created resources
        - watch KIC logs for a successful/failed sync
        - watch the Kong Admin API `/config` endpoint

* test(integration): implement harness and basic tests

* test(integration): run on ci

* chore(test): improve test cleanup

* chore(test): switch from microk8s to kind

* chore(makefile): define target `integration-test`

* test(integration): patch instead of sed, disable anonymous reports

* test(e2e): replace kubectl patch with kustomization

* test(e2e): bump kubectl wait timeout to account for slow pulls

* test(e2e): remove unused PROXY_IP variable

* test(e2e): write README

* test(e2e): add shebang to verify.sh files

* test(e2e): gitignore leftover stuff
rainest pushed a commit that referenced this issue Dec 2, 2020
fixes #694 

- makes CI build a local KIC image from HEAD
- if on `main` or `next`: pushes to bintray. Can (or, maybe, should) be extended to all pushes
- spins up a local microk8s cluster
- pushes the local KIC to the local image registry
- runs an instance of KIC
- runs a set of tests: applying a bunch of manifests, waiting (open loop - `sleep 6`) for KIC to do its work, asserting on `curl` results
    - There are several possible ways to mitigate the `sleep` but none of them is perfect:
        - watch the `status` field of created resources
        - watch KIC logs for a successful/failed sync
        - watch the Kong Admin API `/config` endpoint

* test(integration): implement harness and basic tests

* test(integration): run on ci

* chore(test): improve test cleanup

* chore(test): switch from microk8s to kind

* chore(makefile): define target `integration-test`

* test(integration): patch instead of sed, disable anonymous reports

* test(e2e): replace kubectl patch with kustomization

* test(e2e): bump kubectl wait timeout to account for slow pulls

* test(e2e): remove unused PROXY_IP variable

* test(e2e): write README

* test(e2e): add shebang to verify.sh files

* test(e2e): gitignore leftover stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants