Fix integration tests for OSX

This commit is contained in:
Alfonso Acosta committed 2015-07-06 14:48:53 +01:00
1 parent 5c7763b075
commit 373d663b5e
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ assert_zone_records() {
records=$(weave_on $HOST status | grep "^$CID") || true records=$(weave_on $HOST status | grep "^$CID") || true
# Assert correct number of records exist # Assert correct number of records exist
assert "echo $records | grep -oE '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b' | wc -l" $# assert "echo $records | grep -oE '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b' | wc -l | tr -d '[:space:]'" $#
# Assert correct records exist # Assert correct records exist
for ADDR; do for ADDR; do
+4 -4
View File
@@ -60,16 +60,16 @@ upload_executable() {
remote() { remote() {
rem=$1 rem=$1
shift 1 shift 1
"$@" > >(while read line; do echo -e "\e[0;34m$rem>\e[0m $line"; done) "$@" > >(while read line; do echo -e $'\e[0;34m'"$rem>"$'\e[0m'" $line"; done)
} }
colourise() { colourise() {
[ -t 0 ] && echo -ne '\e['$1'm' || true [ -t 0 ] && echo -ne $'\e['$1'm' || true
shift shift
# It's important that we don't do this in a subshell, as some # It's important that we don't do this in a subshell, as some
# commands we execute need to modify global state # commands we execute need to modify global state
"$@" "$@"
[ -t 0 ] && echo -ne '\e[0m' || true [ -t 0 ] && echo -ne $'\e[0m' || true
} }
whitely() { whitely() {
@@ -154,7 +154,7 @@ assert_dns_record() {
container=$2 container=$2
name=$3 name=$3
shift 3 shift 3
exp_ips_regex=$(echo "$@" | sed -r 's/ /\\\|/g') exp_ips_regex=$(echo "$@" | sed -e 's/ /\\\|/g')
[ -z "$DEBUG" ] || greyly echo "Checking whether $name exists at $host:$container" [ -z "$DEBUG" ] || greyly echo "Checking whether $name exists at $host:$container"
assert_raises "exec_on $host $container getent hosts $name | grep -q '$exp_ips_regex'" assert_raises "exec_on $host $container getent hosts $name | grep -q '$exp_ips_regex'"