Skip to content

Commit

Permalink
Fix temporary dir creation on bats test
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Zanini <[email protected]>
  • Loading branch information
ricardozanini committed Nov 21, 2023
1 parent 2d357c1 commit b94d9a6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ teardown() {
}

@test "verify copy resources is working" {
mkdir -p /tmp/resources
cp -r $BATS_TEST_DIRNAME/../../../../../../tests/shell/kogito-swf-builder/resources/greet-with-inputschema/* /tmp/resources/
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 /tmp/resources/ || true
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 ]]
Expand Down

0 comments on commit b94d9a6

Please sign in to comment.