-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile to run YAKS tests (#1625)
* Add Makefile to run YAKS tests - Adding Makefile as a wrapper for the YAKS binary - Makes local YAKS test execution more comfortable - Automatically set YAKS runtime options such as Camel JBang version or local Kamelets directory - Use the Makefile in GitHub actions CI to run all YAKS tests * Improve aws-s3-to-http.feature Properly waiting for Camel routes to startup before triggering S3 file on bucket
- Loading branch information
1 parent
1c1bdeb
commit b5ba90c
Showing
8 changed files
with
77 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 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. | ||
|
||
camel-version := 4.0.0 | ||
camel-kamelets-version := 4.1.0-SNAPSHOT | ||
kamelet-api-version := v1alpha1 | ||
kamelets-local-dir := ../../../kamelets | ||
test := . | ||
|
||
YAKS_RUN_OPTIONS := --timeout=15m --local -e YAKS_CAMELK_MAX_ATTEMPTS=10 -e YAKS_JBANG_CAMEL_VERSION=$(camel-version) -e YAKS_JBANG_KAMELETS_VERSION=$(camel-kamelets-version) -e YAKS_JBANG_KAMELETS_LOCAL_DIR=$(kamelets-local-dir) -e YAKS_KAMELET_API_VERSION=$(kamelet-api-version) | ||
|
||
default: all | ||
|
||
check-setup: | ||
@java -version | ||
@jbang version | ||
@yaks version | ||
@jbang camel@apache/camel --version | ||
@echo "Test setup - OK" | ||
|
||
all: check-setup | ||
@echo "Running YAKS tests" | ||
@echo # | ||
yaks run . $(YAKS_RUN_OPTIONS) | ||
|
||
yaks: check-setup | ||
@echo "Running YAKS test" | ||
@echo # | ||
yaks run $(test) $(YAKS_RUN_OPTIONS) | ||
|
||
.PHONY: all, yaks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Kamelets YAKS Tests | ||
|
||
This folder contains a suite of integration tests for Kamelets | ||
|
||
You need the following tools to run the tests: | ||
- Java 17 | ||
- [JBang](https://www.jbang.dev/) | ||
- [Camel JBang](https://camel.apache.org/manual/camel-jbang.html) | ||
- [YAKS](https://github.com/citrusframework/yaks) | ||
|
||
Once everything is set you just need to run | ||
|
||
```console | ||
make yaks | ||
``` | ||
|
||
This runs all available YAKS tests that are not marked as `@ignored`. | ||
|
||
You can run individual tests when specifying its folder or feature file name. | ||
|
||
```console | ||
make yaks test=timer-source/timer-source.feature | ||
``` | ||
|
||
The Makefile is a wrapper for the YAKS binary which is able to run the BDD Gherkin feature files. | ||
You can also run YAKS tooling directly form your local machine. | ||
By default, the YAKS tests use local runtime where Camel integrations, Kamelets, bindings and pipes are run with Camel JBang. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters