diff options
Diffstat (limited to 'yarns/implementations.yarn')
-rw-r--r-- | yarns/implementations.yarn | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index cfb744f7..6e1fae18 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -114,6 +114,18 @@ another to hold a chunk. repo-alias = test=file://$DATADIR/gits/%s#file://$DATADIR/gits/%s EOF +Morphologies need to support having a null ref, which means look for the +stratum in the same repository and ref. Testing this requires different +morphologies. + + IMPLEMENTS GIVEN null refs for local strata + nullify_local_refs test:morphs master \ + "$DATADIR/gits/morphs/test-system.morph" \ + "$DATADIR/gits/morphs/test-stratum.morph" + run_in "$DATADIR/gits/morphs" git add . + run_in "$DATADIR/gits/morphs" git commit -m "Use null refs." + + Implementation sections for system branch operations ---------------------------------------------------- @@ -370,3 +382,40 @@ Tagging. assert_morphologies_are_petrified "$MATCH_1" temptemptemp done +Generating a manifest. + + IMPLEMENTS GIVEN a system artifact + mkdir "$DATADIR/hello_world" + + git init "$DATADIR/hello_world" + touch "$DATADIR/hello_world/configure.ac" + run_in "$DATADIR/hello_world" git add configure.ac + run_in "$DATADIR/hello_world" git commit -m 'Add configure.ac' + + mkdir "$DATADIR/baserock" + run_in "$DATADIR/hello_world" cat << EOF \ + > "$DATADIR/baserock/hello_world.meta" + { + "artifact-name": "hello_world", + "cache-key": + "ab8d00a80298a842446ce23507cea6b4d0e34c7ddfa05c67f460318b04d21308", + "kind": "chunk", + "morphology": "hello_world.morph", + "original_ref": "$(run_in "$DATADIR/hello_world" git rev-parse HEAD)", + "repo": "file://$DATADIR/hello_world", + "repo-alias": "upstream:hello_world", + "sha1": "$(run_in "$DATADIR/hello_world" git rev-parse HEAD)", + "source-name": "hello_world" + } + EOF + run_in "$DATADIR" tar -c baserock > "$DATADIR/artifact.tar" + + IMPLEMENTS WHEN morph generates a manifest + run_morph generate-manifest "$DATADIR/artifact.tar" > "$DATADIR/manifest" + + IMPLEMENTS THEN the manifest is generated + + # Generated manifest should contain the name of the repository + if ! grep -q hello_world "$DATADIR/manifest"; then + die "Output isn't what we expect" + fi |