Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scripts/integration-test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -euo pipefail

ORIG_DIR=$(pwd)

Expand All @@ -12,7 +12,7 @@ mkdir -p "${GO_DIR}/bin"
export GOPATH=${GO_DIR}
export GOBIN=${GO_DIR}/bin
export GOTOOLCHAIN=local
PATH=$GOPATH/bin:$GOROOT/bin:$PATH
PATH=$GOPATH/bin:${GOROOT:-}/bin:$PATH

### Encrypt with Go
cd "${ORIG_DIR}/integration/asherah/tests/cross-language/go" || exit 1
Expand All @@ -25,7 +25,7 @@ echo "GOBIN: ${GOBIN}"
go mod tidy

echo Encrypt with Go
go test -v -test.run '^TestEncryptFeatures$' -godog.paths="${ORIG_DIR}/integration/node/features/encrypt.feature"
go test -v -test.run '^TestEncryptFeatures$' -godog.paths="${ORIG_DIR}/integration/node/features/encrypt.feature" || { echo "FAIL: Go encrypt tests failed"; exit 1; }

echo Encrypt and Decrypt with Asherah-Node

Expand All @@ -34,15 +34,15 @@ echo Installing npm packages
CXXFLAGS='-DNODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT' npm install

echo "Running cucumber-js encrypt.feature"
./node_modules/.bin/cucumber-js ./features/encrypt.feature
./node_modules/.bin/cucumber-js ./features/encrypt.feature || { echo "FAIL: cucumber-js encrypt tests failed"; exit 1; }

### Decrypt with Asherah-Node

echo "Running cucumber-js decrypt.feature"
./node_modules/.bin/cucumber-js ./features/decrypt.feature
./node_modules/.bin/cucumber-js ./features/decrypt.feature || { echo "FAIL: cucumber-js decrypt tests failed"; exit 1; }

### Decrypt with Go

echo Decrypt with Go
cd "${ORIG_DIR}/integration/asherah/tests/cross-language/go" || exit 1
go test -v -test.run '^TestDecryptFeatures$' -godog.paths="${ORIG_DIR}/integration/node/features/decrypt.feature"
go test -v -test.run '^TestDecryptFeatures$' -godog.paths="${ORIG_DIR}/integration/node/features/decrypt.feature" || { echo "FAIL: Go decrypt tests failed"; exit 1; }
Loading