Skip to content

Commit

Permalink
Fix CT integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Jan 11, 2021
1 parent 2d8ad20 commit 8100b63
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
cd "$GOPATH/src/github.com/google/certificate-transparency-go"
# echo "replace github.com/google/trillian => $TRILLIAN_DIR" >> go.mod
chmod +x ./trillian/integration/integration_test.sh
./trillian/integration/integration_test.sh
${TRILLIAN_DIR}/integration/run_integration_test.sh "CT Integration" "./trillian/integration/integration_test.sh"
)
- name: "presubmit"
env: GOFLAGS='-race' GO_TEST_TIMEOUT=20m
Expand Down
41 changes: 41 additions & 0 deletions integration/run_integration_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash
#
# run_integration_test.sh is a wrapper around the log_prep and run_test functions.
# It's intended to be used by the Travis CT/Trillian integration test only,
# and will go away when we migrate off of Travis.
set -e

INTEGRATION_DIR="$( cd "$( dirname "$0" )" && pwd )"
. "${INTEGRATION_DIR}"/functions.sh


echo "Launching core Trillian log components"
log_prep_test 1 1

# Cleanup for the Trillian components
TO_DELETE="${TO_DELETE} ${ETCD_DB_DIR}"
TO_KILL+=(${LOG_SIGNER_PIDS[@]})
TO_KILL+=(${RPC_SERVER_PIDS[@]})
TO_KILL+=(${ETCD_PID})

export TRILLIAN_LOG_SERVERS="${RPC_SERVERS}"
export TRILLIAN_LOG_SERVER_1="${RPC_SERVER_1}"

echo "Running test"
run_test "$1" "$2"
RESULT=$?

log_stop_test
TO_KILL=()

if [ $RESULT != 0 ]; then
sleep 1
echo "Server log:"
echo "--------------------"
cat "${TMPDIR}"/trillian_log_server.INFO
echo "Signer log:"
echo "--------------------"
cat "${TMPDIR}"/trillian_log_signer.INFO
fi

exit $RESULT

0 comments on commit 8100b63

Please sign in to comment.