Skip to content

Commit

Permalink
(#5489) Migrate groovy => yaml for ./e2e/knative
Browse files Browse the repository at this point in the history
  • Loading branch information
tdiesler committed Jun 11, 2024
1 parent d2605bd commit befbdcb
Show file tree
Hide file tree
Showing 56 changed files with 43,556 additions and 439 deletions.
4 changes: 3 additions & 1 deletion docs/modules/ROOT/pages/contributing/e2e.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ The test script will install the operators needed in a random namespace, execute
[[testing-e2e-structure]]
== End-To-End tests structure

We have several kind of end-to-end tests. Most of them will only require the installation of Camel K operator, but, others need some particular configuration. This is the reason why they may not work out of the box on your cluster. The main goal of the test is to run in a CI environment, so, all requirements are scripted accordingly. If you want to run a test in your cluster, make sure to provide the configuration as expected by the test suite.
We have several groups of end-to-end tests. Most of them will only require the installation of Camel K operator, but, others need some particular configuration. This is the reason why they may not work out of the box on your cluster. The main goal of the test is to run in a CI environment, so, all requirements are scripted accordingly. If you want to run a test in your cluster, make sure to provide the configuration as expected by the test suite.

There may be a `files/setup.sh` script in some groups (e.g. knative) that can help to get the required configuration in place.

This is the list of the groups we are using (please, notice that they can slightly change in the future):

Expand Down
2 changes: 2 additions & 0 deletions e2e/common/languages/files/yaml-polyglot.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# camel-k: language=yaml

# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 2 additions & 0 deletions e2e/common/languages/files/yaml.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# camel-k: language=yaml

# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
3 changes: 2 additions & 1 deletion e2e/knative/files/flow.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# camel-k: language=yaml
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand All @@ -20,4 +21,4 @@
steps:
- setBody:
constant: "Hello Camel K from yaml"
- to: "log:info"
- to: "log:info"
18 changes: 0 additions & 18 deletions e2e/knative/files/http_out.groovy

This file was deleted.

24 changes: 24 additions & 0 deletions e2e/knative/files/http_out.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# camel-k: language=yaml
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------

- from:
uri: "rest:get:hello/"
steps:
- setBody:
constant: "Hello"
- to: "log:info"
27 changes: 0 additions & 27 deletions e2e/knative/files/knative1.groovy

This file was deleted.

37 changes: 37 additions & 0 deletions e2e/knative/files/knative1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# camel-k: language=yaml
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------

- from:
uri: "timer:tick"
steps:
- setBody:
constant: ""
- choice:
when:
- simple: "${random(0, 2)} == 0"
steps:
- to:
uri: "knative:endpoint/knative2"
- log: "Received from 2: ${body}"
otherwise:
steps:
- to:
uri: "knative:endpoint/knative3"
- log: "Received from 3: ${body}"


19 changes: 0 additions & 19 deletions e2e/knative/files/knative2.groovy

This file was deleted.

23 changes: 23 additions & 0 deletions e2e/knative/files/knative2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# camel-k: language=yaml
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------

- from:
uri: "knative:endpoint/knative2"
steps:
- setBody:
constant: "Hello from knative2"
19 changes: 0 additions & 19 deletions e2e/knative/files/knative3.groovy

This file was deleted.

23 changes: 23 additions & 0 deletions e2e/knative/files/knative3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# camel-k: language=yaml
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------

- from:
uri: "knative:endpoint/knative3"
steps:
- setBody:
constant: "Hello from knative3"
22 changes: 0 additions & 22 deletions e2e/knative/files/knative_broker_receiver.groovy

This file was deleted.

24 changes: 0 additions & 24 deletions e2e/knative/files/knative_broker_sender.groovy

This file was deleted.

20 changes: 0 additions & 20 deletions e2e/knative/files/knativech1.groovy

This file was deleted.

24 changes: 24 additions & 0 deletions e2e/knative/files/knativech1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# camel-k: language=yaml
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------

- from:
uri: "timer:tick"
steps:
- setBody:
constant: "Hello from knativech1"
- to: "knative:channel/messages"
19 changes: 0 additions & 19 deletions e2e/knative/files/knativech2.groovy

This file was deleted.

22 changes: 22 additions & 0 deletions e2e/knative/files/knativech2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# camel-k: language=yaml
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------

- from:
uri: "knative:channel/messages"
steps:
- log: "Received: ${body}"
24 changes: 0 additions & 24 deletions e2e/knative/files/knativeevt1.groovy

This file was deleted.

Loading

0 comments on commit befbdcb

Please sign in to comment.