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

Fix mail-sink Kamelet #1181

Merged
merged 1 commit into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions kamelets/mail-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ spec:
- password
type: object
properties:
protocol:
description: The mail protocol to use
default: smtp
title: Protocol
type: string
connectionHost:
description: The mail server host
example: smtp.gmail.com
Expand Down Expand Up @@ -115,4 +110,12 @@ spec:
simple: "${header[ce-cc]}"
- remove-headers:
pattern: "ce-*"
- to: '{{protocol}}://{{connectionHost}}:{{connectionPort}}?subject={{subject}}&from={{from}}&to={{to}}&username={{username}}&password={{password}}'
- to:
uri: "smtp:{{connectionHost}}:{{connectionPort}}"
parameters:
subject: "{{subject}}"
from: "{{from}}"
to: "{{to}}"
username: "{{username}}"
password: "{{password}}"

Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ spec:
- password
type: object
properties:
protocol:
description: The mail protocol to use
default: smtp
title: Protocol
type: string
connectionHost:
description: The mail server host
example: smtp.gmail.com
Expand Down Expand Up @@ -115,4 +110,12 @@ spec:
simple: "${header[ce-cc]}"
- remove-headers:
pattern: "ce-*"
- to: '{{protocol}}://{{connectionHost}}:{{connectionPort}}?subject={{subject}}&from={{from}}&to={{to}}&username={{username}}&password={{password}}'
- to:
uri: "smtp:{{connectionHost}}:{{connectionPort}}"
parameters:
subject: "{{subject}}"
from: "{{from}}"
to: "{{to}}"
username: "{{username}}"
password: "{{password}}"

7 changes: 4 additions & 3 deletions test/mail-sink/mail-sink.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ Feature: Mail Sink
| message | Camel K rocks |

Scenario: Create mail server
Given load endpoint mail-server.groovy
Given HTTP server "mail-server"
Given HTTP server listening on port 22222
Given create Kubernetes service mail-server with port mapping 25:22222
And stop HTTP server
Given load endpoint mail-server.groovy

Scenario: Create Camel K resources
Given Camel K resource polling configuration
| maxAttempts | 200 |
| delayBetweenAttempts | 2000 |
Given Kamelet mail-sink is available
Given Kamelet timer-source is available
Given load KameletBinding timer-to-mail.yaml
And Camel K integration timer-to-mail should be running
And Camel K integration timer-to-mail should print Routes startup
Expand Down