Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

E2E test: Each source with PubSub backed channel #511

Closed
akashrv opened this issue Jan 22, 2020 · 4 comments · Fixed by #564
Closed

E2E test: Each source with PubSub backed channel #511

akashrv opened this issue Jan 22, 2020 · 4 comments · Fixed by #564
Assignees
Labels
area/test-and-release Test infrastructure, tests or release kind/feature-request New feature or request priority/1 Blocks current release defined by release/* label or blocks current milestone
Milestone

Comments

@akashrv
Copy link

akashrv commented Jan 22, 2020

We need to test each source with PubSub backed channel to avoid breaking CRfA. This could be done in knative-gcp repo or CloudRun repo. I would prefer knative-gcp repo so that issues are caught early at source.

@akashrv akashrv added area/test-and-release Test infrastructure, tests or release kind/feature-request New feature or request labels Jan 22, 2020
@akashrv akashrv added this to the v0.13.0-M1 milestone Jan 22, 2020
@nachocano nachocano modified the milestones: v0.13.0-M1, v0.13.0-M2 Feb 3, 2020
@nachocano
Copy link
Member

@chizhg do you guys think you might have the cycles to work on some of this?
fyi @nlopezgi

@nachocano
Copy link
Member

/assign @nlopezgi

@nachocano
Copy link
Member

nachocano commented Feb 11, 2020

We need this e2e tests, sending from one of our Sources to a Broker backed by PubSub channel, and receiving on the Kn Service on the other end. In order of priority:

  • CloudPubSubSource
  • CloudAuditLogsSource
  • CloudStorageSource
  • CloudSchedulerSource

I think each of the tests can be committed in their own PR, and once we have all of them checked, we can close this issue...

@nachocano
Copy link
Member

Some docs to look at on how to run e2e tests...
https://github.com/google/knative-gcp/tree/master/test/e2e

TL'DR: either submit a WIP PR and PROW will run it for you. Or you can run some scripts locally to upload the tests images, and then run your particular test in your own cluster (will probably be faster for development, unless you skip all the other ones in the WIP PR)

A bunch of the stuff here https://github.com/google/knative-gcp/blob/master/test/e2e/test_broker_pubsub.go can be reused...
The thing we need to change is who is the sender... The current code just tests a sender pod, see

senderJob := resources.SenderJob(senderName, []v1.EnvVar{{

For our new tests, we need the sender to be an actual Source.
For an example of a Source, you can see
func CloudPubSubSourceWithTargetTestImpl(t *testing.T, assertMetrics bool) {
, where we create the Source object, and then publish to a pubsub topic...
There are examples for the other Sources as well in the same package.

@chizhg is our guy when it comes to e2e, so he will help out with the review (and maybe with some suggestions on how to properly refactor things out)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/test-and-release Test infrastructure, tests or release kind/feature-request New feature or request priority/1 Blocks current release defined by release/* label or blocks current milestone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants