Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: tests/push-from-logs.sh

Issue 2394033003: Remove SVN (and dcommit) support from git-cl (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/push-basic.sh ('k') | tests/rename.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/push-from-logs.sh
diff --git a/tests/push-from-logs.sh b/tests/push-from-logs.sh
index f835c778b7a8b256e2db7d40f16d80ce25e68bfb..adef3231bf3b0ee64339518702233c7cbb8939c7 100755
--- a/tests/push-from-logs.sh
+++ b/tests/push-from-logs.sh
@@ -8,13 +8,13 @@ set -e
. ./test-lib.sh
-setup_initgit
-setup_gitgit
+setup_git_remote
+setup_git_checkout
(
set -e
- cd git-git
- git checkout -q --track -b work origin
+ cd git_checkout
+ git checkout -q -t origin/master -b work
echo "some work done on a branch" >> test
git add test; git commit -q -m "branch work"
echo "some other work done on a branch" >> test
@@ -26,12 +26,12 @@ setup_gitgit
git config rietveld.server localhost:10000
test_expect_success "git-cl status has no issue" \
- "$GIT_CL_STATUS | grep -q 'no issue'"
+ "$GIT_CL_STATUS | grep -q 'No issue assigned'"
# Prevent the editor from coming up when you upload.
export EDITOR=$(which true)
test_expect_success "upload succeeds (needs a server running on localhost)" \
- "$GIT_CL upload --no-oauth2 -m test master | \
+ "$GIT_CL upload --no-oauth2 -t test master | \
grep -q 'Issue created'"
test_expect_success "git-cl status now knows the issue" \
@@ -40,27 +40,28 @@ setup_gitgit
# Check to see if the description contains the local commit messages.
# Should contain 'branch work' x 2.
test_expect_success "git-cl status has the right description for the log" \
- "$GIT_CL_STATUS --field desc | [ $( egrep -q '^branch work$' -c ) -eq 2 ]
+ "[[ $($GIT_CL_STATUS --field desc | egrep '^branch work$' -c) -eq 2 ]]"
test_expect_success "git-cl status has the right subject from message" \
- "$GIT_CL_STATUS --field desc | \
- [ $( egrep -q '^test$' --byte-offset) | grep '^0:' ]
+ "$GIT_CL_STATUS --field desc | head -n 1 | grep -q '^test$'"
- test_expect_success "git-cl push ok" \
- "$GIT_CL push -f --no-oauth2"
+ test_expect_success "git-cl land ok" \
+ "$GIT_CL land --bypass-hooks"
- git checkout -q master > /dev/null 2>&1
- git pull -q > /dev/null 2>&1
+ git fetch origin
+ git checkout origin/master
+
+ test_expect_success "committed code has proper summary" \
+ "[[ $(git log -n 1 --pretty=format:%s | egrep '^test$' -c) -eq 1 ]]"
test_expect_success "committed code has proper description" \
- "git show | [ $( egrep -q '^branch work$' -c ) -eq 2 ]
+ "[[ $(git log -n 1 --pretty=format:%b | egrep '^branch work$' -c) -eq 2 ]]"
- test_expect_success "issue no longer has a branch" \
- "$GIT_CL_STATUS | grep -q 'work : None'"
+ # # Have to sleep to let the server return the new status.
+ # sleep 5
+ # test_expect_success "branch issue is closed" \
+ # "$GIT_CL_STATUS | grep -q 'work :.*closed'"
- cd $GITREPO_PATH
- test_expect_success "upstream repo has our commit" \
- "git log master 2>/dev/null | [ $( egrep -q '^branch work$' -c ) -eq 2 ]
)
SUCCESS=$?
« no previous file with comments | « tests/push-basic.sh ('k') | tests/rename.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698