summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-07-03 17:36:17 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-07-03 17:59:14 +0000
commit11b97b7ba9be3389511740306971a9498d3e3bf7 (patch)
tree096b8577c674d579df288df8517a5ab66a7e7493
parentd7fec3d5cc5e18a7a68acdb4c7676ed1fb7304c9 (diff)
downloadmorph-11b97b7ba9be3389511740306971a9498d3e3bf7.tar.gz
tests: Fix the branch-from-image test to get the right SHA
Due to the changes to the way cache keys are computed for chunks, the sed expression in this script was matching two SHAs in the metadata file. This commit tweaks the expression to pick the right one.
-rwxr-xr-xtests.as-root/branch-from-image-works.script2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests.as-root/branch-from-image-works.script b/tests.as-root/branch-from-image-works.script
index fb0b09c9..5a400741 100755
--- a/tests.as-root/branch-from-image-works.script
+++ b/tests.as-root/branch-from-image-works.script
@@ -32,7 +32,7 @@ extracted="$DATADIR/extracted"
mkdir -p "$extracted"
tar -xf "$tar" -C "$extracted"
get_sha1(){
- sed -nre '/sha1/s/^.*([0-9a-f]{40}).*$/\1/p' "$1"
+ sed -nre '/\"sha1\"/s/^.*([0-9a-f]{40}).*$/\1/p' "$1"
}
hello_chunk_commit=$(get_sha1 "$extracted/baserock/hello-bins.meta")