OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 set -e |
| 4 |
| 5 . ./test-lib.sh |
| 6 |
| 7 setup_initsvn |
| 8 setup_gitsvn |
| 9 |
| 10 ( |
| 11 |
| 12 set -e |
| 13 cd git-svn |
| 14 git config rietveld.server localhost:8080 |
| 15 export EDITOR=$(which true) |
| 16 |
| 17 git checkout -q -b work |
| 18 echo "ben@chromium.org" > OWNERS |
| 19 cat <<END > PRESUBMIT.py |
| 20 def CheckChangeOnCommit(input_api, output_api): |
| 21 return input_api.canned_checks.CheckOwners(input_api, output_api) |
| 22 |
| 23 CheckChangeOnUpload = CheckChangeOnCommit |
| 24 END |
| 25 |
| 26 git add OWNERS PRESUBMIT.py ; git commit -q -m "add OWNERS" |
| 27 |
| 28 test_expect_success "upload succeeds (needs a server running on localhost)" \ |
| 29 "$GIT_CL upload -m test master | grep -q 'Issue created'" |
| 30 |
| 31 test_expect_success "git-cl status has a suggested reviewer" \ |
| 32 "$GIT_CL status | grep -q 'R=ben@chromium.org'" |
| 33 |
| 34 test_expect_failure "git-cl dcommit fails w/ missing LGTM" \ |
| 35 "$GIT_CL dcommit" |
| 36 |
| 37 test_expect_success "git-cl dcommit --tbr succeeds" \ |
| 38 "$GIT_CL dcommit --tbr -f | grep -q -- '--tbr was specified'" |
| 39 ) |
| 40 SUCCESS=$? |
| 41 |
| 42 cleanup |
| 43 |
| 44 if [ $SUCCESS == 0 ]; then |
| 45 echo PASS |
| 46 fi |
OLD | NEW |