summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-07-03 13:49:12 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-07-03 13:49:12 +0000
commita82d6573794c45e3065100561698a86f9e3e610c (patch)
tree9c3bcb2613ff432385835bd9b8960edb69e205ab
parentc1c5cf9de4380b89ca69985b59e4eee7ac8bc3cb (diff)
downloadmorph-a82d6573794c45e3065100561698a86f9e3e610c.tar.gz
Fix the tests to test the use of the chunk morphology to calculate cache keys
-rw-r--r--morphlib/cachekeycomputer_tests.py9
-rwxr-xr-xtests.as-root/branch-from-image-works.script2
2 files changed, 7 insertions, 4 deletions
diff --git a/morphlib/cachekeycomputer_tests.py b/morphlib/cachekeycomputer_tests.py
index fb3c2782..b504d0ca 100644
--- a/morphlib/cachekeycomputer_tests.py
+++ b/morphlib/cachekeycomputer_tests.py
@@ -36,15 +36,18 @@ class CacheKeyComputerTests(unittest.TestCase):
for name, text in {
'chunk.morph': '''{
"name": "chunk",
- "kind": "chunk"
+ "kind": "chunk",
+ "description": "A test chunk"
}''',
'chunk2.morph': '''{
"name": "chunk2",
- "kind": "chunk"
+ "kind": "chunk",
+ "description": "A test chunk"
}''',
'chunk3.morph': '''{
"name": "chunk3",
- "kind": "chunk"
+ "kind": "chunk",
+ "description": "A test chunk"
}''',
'stratum.morph': '''{
"name": "stratum",
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")