summaryrefslogtreecommitdiff
path: root/tests.branching
diff options
context:
space:
mode:
authorPaul Sherwood <paul.sherwood@codethink.co.uk>2014-06-08 11:53:09 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-09 13:31:30 +0000
commit21e00e2a8acdeb5a67fb3d1eded28a4a0bcbd94a (patch)
treef6571971e668ba8189d90bf9c433066248b6dca4 /tests.branching
parent901e79ec9020bc810230625ba824321379f24b85 (diff)
downloadmorph-21e00e2a8acdeb5a67fb3d1eded28a4a0bcbd94a.tar.gz
Fix tests for new `morph edit` syntax
Diffstat (limited to 'tests.branching')
-rwxr-xr-xtests.branching/add-then-edit.script5
-rwxr-xr-xtests.branching/edit-checkouts-existing-chunk.script2
-rwxr-xr-xtests.branching/edit-clones-chunk.script4
-rwxr-xr-xtests.branching/edit-handles-submodules.script2
-rwxr-xr-xtests.branching/edit-updates-stratum.script2
-rwxr-xr-xtests.branching/edit-works-after-branch-root-was-renamed.script4
-rwxr-xr-xtests.branching/foreach-handles-command-failure.script4
-rwxr-xr-xtests.branching/morph-repository-stored-in-cloned-repositories.script2
-rwxr-xr-xtests.branching/petrify.script2
-rwxr-xr-xtests.branching/status-in-dirty-branch.script2
-rwxr-xr-xtests.branching/workflow-separate-stratum-repos.script4
-rwxr-xr-xtests.branching/workflow.script2
12 files changed, 16 insertions, 19 deletions
diff --git a/tests.branching/add-then-edit.script b/tests.branching/add-then-edit.script
index 2dd62254..be3315d9 100755
--- a/tests.branching/add-then-edit.script
+++ b/tests.branching/add-then-edit.script
@@ -29,9 +29,6 @@ cd "me/add-then-edit"
# add a chunk
cd test/morphs
-## Sub-optimally, to alter the stratum, you have to `morph edit` it first
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum
-
python -c 'import yaml
with open("hello-stratum.morph", "r") as f:
stratum = yaml.load(f)
@@ -45,7 +42,7 @@ with open("hello-stratum.morph", "w") as f:
yaml.dump(stratum, f)
'
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum goodbye
+"$SRCDIR/scripts/test-morph" edit goodbye
# check whether the stratum still contains the goodbye chunk
grep -qFe goodbye hello-stratum.morph
diff --git a/tests.branching/edit-checkouts-existing-chunk.script b/tests.branching/edit-checkouts-existing-chunk.script
index c8fb9312..df2a7d85 100755
--- a/tests.branching/edit-checkouts-existing-chunk.script
+++ b/tests.branching/edit-checkouts-existing-chunk.script
@@ -27,7 +27,7 @@ cd "$DATADIR/workspace"
# Edit the hello chunk in alfred.
cd "alfred"
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
+"$SRCDIR/scripts/test-morph" edit hello
echo "Current branches:"
"$SRCDIR/scripts/test-morph" foreach git branch
diff --git a/tests.branching/edit-clones-chunk.script b/tests.branching/edit-clones-chunk.script
index d3324078..a6313ca6 100755
--- a/tests.branching/edit-clones-chunk.script
+++ b/tests.branching/edit-clones-chunk.script
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2012-2013 Codethink Limited
+# Copyright (C) 2012-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" branch test:morphs newbranch
# Edit chunk.
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
+"$SRCDIR/scripts/test-morph" edit hello
echo "Current branches:"
"$SRCDIR/scripts/test-morph" foreach git branch
diff --git a/tests.branching/edit-handles-submodules.script b/tests.branching/edit-handles-submodules.script
index 2ab39420..09592f74 100755
--- a/tests.branching/edit-handles-submodules.script
+++ b/tests.branching/edit-handles-submodules.script
@@ -26,7 +26,7 @@ cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" branch test:morphs newbranch
# Submodules should be set up automatically
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
+"$SRCDIR/scripts/test-morph" edit hello
cd "$DATADIR/workspace/newbranch/test/hello"
[ -e foolib/README ]
diff --git a/tests.branching/edit-updates-stratum.script b/tests.branching/edit-updates-stratum.script
index cf5fc26d..b60c46e7 100755
--- a/tests.branching/edit-updates-stratum.script
+++ b/tests.branching/edit-updates-stratum.script
@@ -26,7 +26,7 @@ cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" branch test:morphs newbranch
# Edit chunk.
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
+"$SRCDIR/scripts/test-morph" edit hello
# See what effect the editing had.
"$SRCDIR/scripts/run-git-in" "newbranch/test/morphs" diff
diff --git a/tests.branching/edit-works-after-branch-root-was-renamed.script b/tests.branching/edit-works-after-branch-root-was-renamed.script
index c7043e27..e28ab7df 100755
--- a/tests.branching/edit-works-after-branch-root-was-renamed.script
+++ b/tests.branching/edit-works-after-branch-root-was-renamed.script
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2012-2013 Codethink Limited
+# Copyright (C) 2012-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ cd "$DATADIR/workspace"
cd "$DATADIR/workspace/master"
mv test:morphs my-renamed-morphs
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
+"$SRCDIR/scripts/test-morph" edit hello
"$SRCDIR/scripts/list-tree" "$DATADIR/workspace" | grep -v '/\.git/' |
sed 's,/cache/gits/file_[^/]*_,/cache/gits/file_,' |
diff --git a/tests.branching/foreach-handles-command-failure.script b/tests.branching/foreach-handles-command-failure.script
index eea381c8..4bc71c78 100755
--- a/tests.branching/foreach-handles-command-failure.script
+++ b/tests.branching/foreach-handles-command-failure.script
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2012 Codethink Limited
+# Copyright (C) 2012-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,6 +23,6 @@ set -eu
cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" checkout test:morphs master
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
+"$SRCDIR/scripts/test-morph" edit hello
"$SRCDIR/scripts/test-morph" foreach git remote update non-existant-remote
diff --git a/tests.branching/morph-repository-stored-in-cloned-repositories.script b/tests.branching/morph-repository-stored-in-cloned-repositories.script
index 342c3d0b..f60b16ae 100755
--- a/tests.branching/morph-repository-stored-in-cloned-repositories.script
+++ b/tests.branching/morph-repository-stored-in-cloned-repositories.script
@@ -42,7 +42,7 @@ git config morph.repository
echo
cd "$DATADIR/workspace/master"
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
+"$SRCDIR/scripts/test-morph" edit hello
echo "morph.repository of an edited repository:"
cd "$DATADIR/workspace/master/test/hello"
diff --git a/tests.branching/petrify.script b/tests.branching/petrify.script
index 5a3cb8c4..f8e7c1e9 100755
--- a/tests.branching/petrify.script
+++ b/tests.branching/petrify.script
@@ -29,7 +29,7 @@ cd "$DATADIR/workspace"
cd test/petrify/test/morphs
git push --quiet origin HEAD
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum goodbye
+"$SRCDIR/scripts/test-morph" edit goodbye
(cd ../goodbye && git push --quiet origin HEAD)
"$SRCDIR/scripts/test-morph" petrify
diff --git a/tests.branching/status-in-dirty-branch.script b/tests.branching/status-in-dirty-branch.script
index 7fdd8862..37fca97b 100755
--- a/tests.branching/status-in-dirty-branch.script
+++ b/tests.branching/status-in-dirty-branch.script
@@ -35,7 +35,7 @@ cd "$DATADIR/workspace"
# Make the branch have some interesting changes and pitfalls
cd branch1
-"$SRCDIR/scripts/test-morph" edit hello-system stratum2 hello
+"$SRCDIR/scripts/test-morph" edit hello
cd test/stratum2-hello
git checkout -q master
diff --git a/tests.branching/workflow-separate-stratum-repos.script b/tests.branching/workflow-separate-stratum-repos.script
index f2fd519b..1d8cc1e5 100755
--- a/tests.branching/workflow-separate-stratum-repos.script
+++ b/tests.branching/workflow-separate-stratum-repos.script
@@ -34,14 +34,14 @@ cd "$DATADIR/workspace"
# Edit one chunk
cd "me/readme-fixes"
-"$SRCDIR/scripts/test-morph" edit hello-system stratum2 hello
+"$SRCDIR/scripts/test-morph" edit hello
cd "$DATADIR/workspace/me/readme-fixes/test/stratum2-hello"
echo > README yoyoyo
git add README
git commit -m "Fix README in hello" --quiet
# Edit the other chunk too
-"$SRCDIR/scripts/test-morph" edit hello-system stratum3 hello
+"$SRCDIR/scripts/test-morph" edit hello
cd "$DATADIR/workspace/me/readme-fixes/test/stratum3-hello"
echo > README yoyoyo
git add README
diff --git a/tests.branching/workflow.script b/tests.branching/workflow.script
index 51a8d106..f84489db 100755
--- a/tests.branching/workflow.script
+++ b/tests.branching/workflow.script
@@ -23,7 +23,7 @@ set -eu
cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch test:morphs me/readme-fix
-"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
+"$SRCDIR/scripts/test-morph" edit hello
cd me/readme-fix/test/hello
echo > README yoyoyo
git add README