---
yarns/branches-workspaces.yarn | 20 ++++++++++++++++++++
yarns/implementations.yarn | 7 +++++++
yarns/morph.shell-lib | 8 ++++++++
yarns/print-architecture.yarn | 1 +
yarns/regression.yarn | 1 +
5 files changed, 37 insertions(+)
diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn
index cd3f7a0..8a91eb1 100644
--- a/yarns/branches-workspaces.yarn
+++ b/yarns/branches-workspaces.yarn
@@ -46,6 +46,7 @@ Once we have a workspace, we can check out a system branch.
SCENARIO check out an existing system branch
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN checking out the master system branch
THEN the system branch master is checked out
@@ -54,6 +55,7 @@ Checking out a system branch should fail, if the branch doesn't
exist.
SCENARIO checking out a system branch that doesn't exist
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN morph attempts to check out system branch foo
THEN morph failed
@@ -63,6 +65,7 @@ not contain any system morphologies.
SCENARIO checking out a system branch with no systems
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN morph attempts to check out a repository with no systems
THEN morph failed
@@ -71,6 +74,7 @@ We can, instead, create a new system branch, off master.
SCENARIO branch off master
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN creating system branch foo
THEN the system branch foo is checked out
@@ -81,6 +85,7 @@ to check for that locally.
SCENARIO branch off non-master
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN creating system branch foo
AND pushing system branch foo to git server
@@ -103,6 +108,7 @@ a git checkout inside that.
SCENARIO morph workspace works in system branch checkouts
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN checking out the master system branch
AND morph reports workspace in master
@@ -129,6 +135,7 @@ current working directory, it will find it and report it correctly.
SCENARIO morph reports system branch
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN checking out the master system branch
AND reporting system branch in master
@@ -145,6 +152,7 @@ current directory, things should fail.
SCENARIO morph fails to report system branch with two checked out
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN checking out the master system branch
AND creating system branch foo
@@ -157,6 +165,7 @@ somewhere outside a checkout, where exactly one checkout exists
below.
SCENARIO morph reports system branch root repository
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN checking out the master system branch
AND reporting system branch root repository in master
@@ -170,6 +179,7 @@ branches checked out.
SCENARIO morph fails to report system branch with none checked out
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN attempting to report system branch root repository in .
THEN morph failed
@@ -185,6 +195,7 @@ all the refs are unchanged.
SCENARIO morph branch does not edit refs
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN creating system branch foo
THEN in branch foo, system test-system refs test-stratum in master
@@ -213,6 +224,7 @@ repositories referenced in the system branch.
SCENARIO morph status reports changes correctly
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN creating system branch foo
THEN morph reports no outstanding changes in foo
@@ -243,6 +255,7 @@ branch checkout.
SCENARIO morph foreach runs command in each git repo
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN creating system branch foo
AND editing chunk test-chunk in test-stratum in test-system in branch foo
@@ -260,6 +273,7 @@ unpetrify and verify that we have all the same refs as before.
SCENARIO morph petrifies and unpetrifies
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN creating system branch foo
AND pushing system branch foo to git server
@@ -278,6 +292,7 @@ system branch itself, only the tag.
SCENARIO morph tags a system branch
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN creating system branch foo
AND tagging system branch foo as test123
@@ -301,6 +316,7 @@ These can be checked out like normal system branches.
SCENARIO check out an existing system branch with null refs
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
AND null refs for local strata
WHEN checking out the master system branch
@@ -312,6 +328,7 @@ wouldn't need to worry about changing the system branch ref.
SCENARIO branch off a system branch with null refs
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
AND null refs for local strata
WHEN creating system branch foo
@@ -321,6 +338,7 @@ When we edit a morphology with null refs, they stay null.
SCENARIO editing with null refs
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
AND null refs for local strata
@@ -345,6 +363,7 @@ Petrifying also leaves null refs unmolested
SCENARIO morph petrifies null refs
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
AND null refs for local strata
WHEN creating system branch foo
@@ -357,6 +376,7 @@ Generating a manifest works
SCENARIO morph generates a manifest
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a system artifact
WHEN morph generates a manifest
THEN the manifest is generated
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index d03e7ae..c11e54b 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -517,3 +517,10 @@ Implementations for building systems
IMPLEMENTS THEN morph build the system (\S+) of the (branch|tag) (\S+) of the repo
(\S+)
cd "$DATADIR/workspace/$MATCH_3/$MATCH_4"
run_morph build "$MATCH_1"
+
+Implementations for Git configurations
+--------------------------------------
+
+ IMPLEMENTS GIVEN a git user "(\S+)" with email "(\S+)"
+ git config --global user.email "$MATCH_2"
+ git config --global user.name "$MATCH_1"
diff --git a/yarns/morph.shell-lib b/yarns/morph.shell-lib
index 448c60c..b8dc6f0 100644
--- a/yarns/morph.shell-lib
+++ b/yarns/morph.shell-lib
@@ -156,3 +156,11 @@ if ! env | grep '^SRCDIR=' > /dev/null
then
export SRCDIR="$(pwd)"
fi
+
+# Added until it's fixed in upstream.
+# It's a solution to create an empty home directory each execution
+export HOME="$DATADIR/home"
+if [ ! -d "$HOME" ]
+then
+ mkdir "$HOME"
+fi
diff --git a/yarns/print-architecture.yarn b/yarns/print-architecture.yarn
index e45d7d1..c249614 100644
--- a/yarns/print-architecture.yarn
+++ b/yarns/print-architecture.yarn
@@ -19,6 +19,7 @@ Oh, and the one line should contain no spaces, either.
AND stderr is empty
IMPLEMENTS WHEN morph print-architecture is run
+ set +x
run_morph print-architecture > "$DATADIR/stdout" 2>
"$DATADIR/stderr"
IMPLEMENTS THEN stdout contains a single line
diff --git a/yarns/regression.yarn b/yarns/regression.yarn
index d1cc8e7..a0cfd6c 100644
--- a/yarns/regression.yarn
+++ b/yarns/regression.yarn
@@ -8,6 +8,7 @@ Testing if we can build after checking out from a tag.
SCENARIO morph build works after checkout from a tag
GIVEN a workspace
+ AND a git user "TestUser" with email "test@user"
AND a git server
WHEN checking out the test-tag system tag
THEN morph build the system simple-system of the tag test-tag of the repo
test:morphs
--
1.7.10.4