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

Side by Side Diff: tests/abandon.sh

Issue 1095033002: Enable OAuth2 by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: fix smoke tests Created 5 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « auth.py ('k') | tests/basic.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Check that abandoning a branch also abandons its issue. 7 # Check that abandoning a branch also abandons its issue.
8 8
9 set -e 9 set -e
10 10
11 . ./test-lib.sh 11 . ./test-lib.sh
12 12
13 setup_initsvn 13 setup_initsvn
14 setup_gitsvn 14 setup_gitsvn
15 15
16 ( 16 (
17 set -e 17 set -e
18 cd git-svn 18 cd git-svn
19 git config rietveld.server localhost:10000 19 git config rietveld.server localhost:10000
20 20
21 # Create a branch and give it an issue. 21 # Create a branch and give it an issue.
22 git checkout -q -b abandoned 22 git checkout -q -b abandoned
23 echo "some work done on a branch" >> test 23 echo "some work done on a branch" >> test
24 git add test; git commit -q -m "branch work" 24 git add test; git commit -q -m "branch work"
25 export GIT_EDITOR=$(which true) 25 export GIT_EDITOR=$(which true)
26 test_expect_success "upload succeeds" \ 26 test_expect_success "upload succeeds" \
27 "$GIT_CL upload -m test master | grep -q 'Issue created'" 27 "$GIT_CL upload --no-oauth2 -m test master | grep -q 'Issue created'"
28 28
29 # Switch back to master, delete the branch. 29 # Switch back to master, delete the branch.
30 git checkout master 30 git checkout master
31 git branch -D abandoned 31 git branch -D abandoned
32 32
33 # Verify that "status" doesn't know about it anymore. 33 # Verify that "status" doesn't know about it anymore.
34 # The "exit" trickiness is inverting the exit status of grep. 34 # The "exit" trickiness is inverting the exit status of grep.
35 test_expect_success "git-cl status dropped abandoned branch" \ 35 test_expect_success "git-cl status dropped abandoned branch" \
36 "$GIT_CL_STATUS | grep -q abandoned && exit 1 || exit 0" 36 "$GIT_CL_STATUS | grep -q abandoned && exit 1 || exit 0"
37 ) 37 )
38 38
39 SUCCESS=$? 39 SUCCESS=$?
40 40
41 cleanup 41 cleanup
42 42
43 if [ $SUCCESS == 0 ]; then 43 if [ $SUCCESS == 0 ]; then
44 echo PASS 44 echo PASS
45 fi 45 fi
OLDNEW
« no previous file with comments | « auth.py ('k') | tests/basic.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698