kubeshop / testkube

☸️ Kubernetes-native testing framework for test execution and orchestration
https://testkube.io
Other
1.37k stars 134 forks source link

CDEvent Test Triggers #2991

Open olensmar opened 1 year ago

olensmar commented 1 year ago

I want Testkube to run a Test or TestSuite when receiving CDEvents defined at https://cdevents.dev/docs/

For each trigger I want to configure

For example

cdevent-trigger:
  subject: service
  predicates:
    - deployed
  fields:
     - name: id
       value: service/petstore
    - name: environment
       value: "production"
  testSuite : my-test-suite

Would run the my-test-suite TestSuite if a deployed event is received for the service subject with the specified id and environment - see https://github.com/cdevents/spec/blob/v0.1.1/continuous-deployment-pipeline-events.md#service-deployed

Testkube would have to listen for these events on an HTTP endpoint that could be targeted by external systems. The events would be received in HTTP binary mode as shown at https://github.com/cdevents/spec/blob/v0.1.1/cloudevents-binding.md#examples

TheBrunoLopes commented 1 year ago

Great stuff, it should also be possible to run Test/suites based on labels.

olensmar commented 1 year ago

good point - thanks @TheBrunoLopes - added to description !