Skip to content

Commit

Permalink
chore(e2e): replace createTimerKamelet func
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Aug 8, 2022
1 parent f107f5b commit c66a382
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions e2e/global/common/kamelet_binding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestKameletBinding(t *testing.T) {
// Kamelet binding with traits testing
t.Run("test kamelet binding with trait", func(t *testing.T) {
RegisterTestingT(t)
Expect(createTimerKamelet(ns, "my-own-timer-source")()).To(Succeed())
Expect(CreateTimerKamelet(ns, "my-own-timer-source")()).To(Succeed())
// Log sink kamelet exists from previous test

from := corev1.ObjectReference{
Expand Down Expand Up @@ -172,29 +172,3 @@ func createErrorProducerKamelet(ns string, name string) func() error {

return CreateKamelet(ns, name, flow, props, nil)
}

func createTimerKamelet(ns string, name string) func() error {
props := map[string]v1alpha1.JSONSchemaProp{
"message": {
Type: "string",
},
}

flow := map[string]interface{}{
"from": map[string]interface{}{
"uri": "timer:tick",
"steps": []map[string]interface{}{
{
"set-body": map[string]interface{}{
"constant": "{{message}}",
},
},
{
"to": "kamelet:sink",
},
},
},
}

return CreateKamelet(ns, name, flow, props, nil)
}

0 comments on commit c66a382

Please sign in to comment.