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

Create an end to end test (in go) that creates an EventListener #37

Closed
bobcatfish opened this issue Jul 23, 2019 · 4 comments
Closed

Create an end to end test (in go) that creates an EventListener #37

bobcatfish opened this issue Jul 23, 2019 · 4 comments
Assignees
Milestone

Comments

@bobcatfish
Copy link
Collaborator

Expected Behavior

We should have a suite of end to end tests that we can use to test triggers functionality. We can start with a simple one that:

  1. Creates an EventListener
  2. Confirms it is created
  3. Deletes the EventListener
  4. Confirms it is deleted

(If #36 happens first, this test can actually look for a running container, otherwise this will be a very light test!)

Actual Behavior

We've got a dummy test but not actually invoking any of our libs yet :D

Additional Info

One question at this point is do we want to use the knative test lib? I think it's probably simpler to use it, e.g.:

https://github.com/tektoncd/pipeline/blob/b91640d7db3d2de6fcb8c30c618a417047a03c12/test/embed_test.go#L69-L70

However it's not that complicated to implement our own (this is an example of what's required to hit most of the common stuff we'd need to do) https://github.com/bobcatfish/testing-crds/blob/master/client-go/test/cat_test.go#L136

Up to the implementer of this issue 😉 and also something we can easily change later!

@ncskier
Copy link
Member

ncskier commented Jul 30, 2019

@bobcatfish @vdemeester
For these Tekton Triggers go tests, should we follow the Pipeline repo's test format, and use the knative.dev/pkg/test library? For example, we'd probably create an init_test.go file similar to the one in Pipelines.

@vdemeester
Copy link
Member

I think so, yes

@ncskier
Copy link
Member

ncskier commented Jul 30, 2019

Ok, thanks

@ncskier
Copy link
Member

ncskier commented Aug 7, 2019

Closing this issue because we merged PR #53 👍

@ncskier ncskier closed this as completed Aug 7, 2019
@bobcatfish bobcatfish added this to the Triggers 0.1 milestone Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants