diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-07-03 13:49:12 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-07-03 13:49:12 +0000 |
commit | a82d6573794c45e3065100561698a86f9e3e610c (patch) | |
tree | 9c3bcb2613ff432385835bd9b8960edb69e205ab | |
parent | c1c5cf9de4380b89ca69985b59e4eee7ac8bc3cb (diff) | |
download | morph-a82d6573794c45e3065100561698a86f9e3e610c.tar.gz |
Fix the tests to test the use of the chunk morphology to calculate cache keys
-rw-r--r-- | morphlib/cachekeycomputer_tests.py | 9 | ||||
-rwxr-xr-x | tests.as-root/branch-from-image-works.script | 2 |
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") |