-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KOGITO-9729] - (fix) Preserve directory structure while copying file…
…s in builder image (#1711) Signed-off-by: Ricardo Zanini <[email protected]>
- Loading branch information
1 parent
5fac5e9
commit a7f997b
Showing
4 changed files
with
38 additions
and
7 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
27 changes: 27 additions & 0 deletions
27
modules/kogito-swf/common/scripts/tests/bats/kogito-swf-builder-build-app.bats
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 @@ | ||
#!/usr/bin/env bats | ||
|
||
setup() { | ||
export KOGITO_HOME=/tmp/kogito | ||
export HOME="${KOGITO_HOME}" | ||
mkdir -p "${KOGITO_HOME}"/launch | ||
mkdir -p "${KOGITO_HOME}"/serverless-workflow-project/src/main/resources/ | ||
cp $BATS_TEST_DIRNAME/../../../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/ | ||
cp $BATS_TEST_DIRNAME/../../added/jvm-settings.sh "${KOGITO_HOME}"/launch/ | ||
cp $BATS_TEST_DIRNAME/../../added/build-app.sh "${KOGITO_HOME}"/launch/ | ||
} | ||
|
||
teardown() { | ||
rm -rf "${KOGITO_HOME}" | ||
rm -rf /tmp/resources | ||
} | ||
|
||
@test "verify copy resources is working" { | ||
TEMPD=$(mktemp -d) | ||
cp -r $BATS_TEST_DIRNAME/../../../../../../tests/shell/kogito-swf-builder/resources/greet-with-inputschema/* ${TEMPD} | ||
|
||
# We don't care about the errors to try to execute and build the program, just the copy matters | ||
source ${KOGITO_HOME}/launch/build-app.sh ${TEMPD} || true | ||
|
||
[[ -f "${KOGITO_HOME}"/serverless-workflow-project/src/main/resources/greet.sw.json ]] | ||
[[ -f "${KOGITO_HOME}"/serverless-workflow-project/src/main/resources/schemas/input.json ]] | ||
} |
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