From 11b97b7ba9be3389511740306971a9498d3e3bf7 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Thu, 3 Jul 2014 17:36:17 +0000 Subject: 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. --- tests.as-root/branch-from-image-works.script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- cgit v1.2.1