Skip to content

Commit

Permalink
Try to debug integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfonso Acosta committed Mar 25, 2016
1 parent 67ce11a commit 146e4a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions integration/420_host_control_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@

. ./config.sh

exec > /tmp/420_host_log.txt 2>&1
set -x

start_suite "Test host controls"

weave_on $HOST1 launch
scope_on $HOST1 launch

PROBEID=$(docker_on $HOST1 logs weavescope 2>&1 | grep "probe starting" | sed -n 's/^.*ID \([0-9a-f]*\)$/\1/p')
echo PROBEID $PROBEID
HOSTID=$($SSH $HOST1 hostname)
echo HOSTID $HOSTID

# Execute 'echo foo' in the host tty and check its output
PIPEID=$(curl -s -f -X POST "http://$HOST1:4040/api/control/$PROBEID/$HOSTID;<host>/host_exec" | jq -r '.pipe' )
echo PIPEID $PIPEID
assert "(sleep 1 && echo \"PS1=''; echo foo\" && sleep 1) | wscat -b 'ws://$HOST1:4040/api/pipe/$PIPEID' | col -pb | tail -n 1" "foo\n"

curl -s "http://$HOST1:4040/api/report" > /tmp/report.json

scope_end_suite
4 changes: 2 additions & 2 deletions tools/integration/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
whitely echo ...ok

TESTS="${@:-$(find . -name '*_test.sh')}"
RUNNER_ARGS=""
RUNNER_ARGS="-verbose"

# If running on circle, use the scheduler to work out what tests to run
if [ -n "$CIRCLECI" -a -z "$NO_SCHEDULER" ]; then
Expand All @@ -24,4 +24,4 @@ if [ -n "$CIRCLECI" -o -n "$PARALLEL" ]; then
fi

make -C ${DIR}/../runner
HOSTS="$HOSTS" "${DIR}/../runner/runner" $RUNNER_ARGS $TESTS
HOSTS="$HOSTS" "${DIR}/../runner/runner" $RUNNER_ARGS $TESTS |& tee test_log.txt

0 comments on commit 146e4a9

Please sign in to comment.