Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

add exec_on test helper #590

Merged
merged 1 commit into from
Apr 22, 2015
Merged

Conversation

rade
Copy link
Member

@rade rade commented Apr 22, 2015

so we don't repeat the remote docker invocation command (complete with hard-coded port) over and over again.

so we don't repeat the remote docker invocation command (complete with
hard-coded port) over and over again.
@rade
Copy link
Member Author

rade commented Apr 22, 2015

Note that there is a bug here... there are a bunch of tests that used to run as sh -c. I stripped that off. But now the error handling doesn't work, i.e. the scripts just terminate at that point. Alas it turns out that was the case before too! I experimented with a few variations but no luck. @awh I welcome suggestions on how to fix that. I wonder whether we should just test the exit status, and dispense with the "&& echo ok".

@awh
Copy link
Contributor

awh commented Apr 22, 2015

I encountered this yesterday - I think it's caused by the set -e at the top of config.sh, which is sourced into all the test scripts. As a consequence a statement such as

ok=$(docker -H tcp://$HOST1:2375 exec c1 sh -c "ping -q -c 4 $C2 >&2 && echo ok")

would cause the script to exit abruptly if the ping fails due to it returning a non-zero status. I'll propose a solution as part of the work I'm doing to make run_all.sh behave nicely in the case of test failures (see #591).

awh added a commit that referenced this pull request Apr 22, 2015
@awh awh merged commit 849bd52 into weaveworks:master Apr 22, 2015
@rade rade modified the milestone: 0.11.0 May 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants