From 18b0906e1fa6510087c7455c7dee652e5b5842ef Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 10 Jun 2013 00:23:38 +0000 Subject: [PATCH] Correct InvalidInstanceID.NotFound test. * exercises/euca.sh: The match filtering InvalidInstanceID.NotFound is cleaned up to eliminate numerous leaning toothpicks, and now also actually works. The previous version was incorporating literal square brackets into the pattern where I think a character list match may have been intended instead, but was not actually necessary anyway. Change-Id: I765a20000e7b6ba6deadce8cad3bbc9559fcdd0d --- exercises/euca.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/euca.sh b/exercises/euca.sh index d704279431..16b5f8e402 100755 --- a/exercises/euca.sh +++ b/exercises/euca.sh @@ -162,7 +162,7 @@ euca-terminate-instances $INSTANCE || \ # case changed with bug/836978. Requesting the status of an invalid instance # will now return an error message including the instance id, so we need to # filter that out. -if ! timeout $TERMINATE_TIMEOUT sh -c "while euca-describe-instances $INSTANCE | grep -ve \"\\\(InstanceNotFound\\\|InvalidInstanceID\[.\]NotFound\\\)\" | grep -q $INSTANCE; do sleep 1; done"; then +if ! timeout $TERMINATE_TIMEOUT sh -c "while euca-describe-instances $INSTANCE | grep -ve '\(InstanceNotFound\|InvalidInstanceID\.NotFound\)' | grep -q $INSTANCE; do sleep 1; done"; then die $LINENO "server didn't terminate within $TERMINATE_TIMEOUT seconds" fi