mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-18 12:59:31 +00:00
Integration test
This commit is contained in:
3
Makefile
3
Makefile
@@ -152,4 +152,5 @@ deps:
|
||||
$(GO) get -u -f -tags $(GO_BUILD_TAGS) \
|
||||
github.com/FiloSottile/gvt \
|
||||
github.com/mattn/goveralls \
|
||||
github.com/weaveworks/github-release
|
||||
github.com/weaveworks/github-release \
|
||||
github.com/2opremio/trifles/wscat
|
||||
|
||||
@@ -14,6 +14,12 @@ wait_for_containers $HOST1 60 alpine
|
||||
assert "docker_on $HOST1 inspect --format='{{.State.Running}}' alpine" "true"
|
||||
PROBEID=$(docker_on $HOST1 logs weavescope 2>&1 | grep "probe starting" | sed -n 's/^.*ID \([0-9a-f]*\)$/\1/p')
|
||||
HOSTID=$(echo $HOST1 | cut -d"." -f1)
|
||||
|
||||
|
||||
# Execute 'echo foo' in a container tty and check its output
|
||||
PIPEID=$(curl -s -f -X POST "http://$HOST1:4040/api/control/$PROBEID/$CID;<container>/docker_exec_container" | jq -r '.pipe' )
|
||||
assert "(sleep 1 && echo 'echo foo' && sleep 1) | wscat -b 'ws://$HOST1:4040/api/pipe/$PIPEID' | col -pb" "/ # 6necho foo\nfoo\n/ # 6n"
|
||||
|
||||
assert_raises "curl -f -X POST 'http://$HOST1:4040/api/control/$PROBEID/$CID;<container>/docker_stop_container'"
|
||||
|
||||
sleep 5
|
||||
|
||||
Reference in New Issue
Block a user