| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 set -e | 3 set -e |
| 4 | 4 |
| 5 . ./test-lib.sh | 5 . ./test-lib.sh |
| 6 | 6 |
| 7 setup_initsvn | 7 setup_initsvn |
| 8 setup_gitsvn | 8 setup_gitsvn |
| 9 | 9 |
| 10 ( | 10 ( |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 git config rietveld.server localhost:8080 | 22 git config rietveld.server localhost:8080 |
| 23 | 23 |
| 24 test_expect_success "git-cl status has no issue" \ | 24 test_expect_success "git-cl status has no issue" \ |
| 25 "$GIT_CL status | grep -q 'no issue'" | 25 "$GIT_CL status | grep -q 'no issue'" |
| 26 | 26 |
| 27 # Prevent the editor from coming up when you upload. | 27 # Prevent the editor from coming up when you upload. |
| 28 export EDITOR=$(which true) | 28 export EDITOR=$(which true) |
| 29 | 29 |
| 30 test_expect_success "upload succeeds (needs a server running on localhost)" \ | 30 test_expect_success "upload succeeds (needs a server running on localhost)" \ |
| 31 "$GIT_CL upload -m test master... | grep -q 'Issue created'" | 31 "$GIT_CL upload -m test master | grep -q 'Issue created'" |
| 32 | 32 |
| 33 test_expect_success "git-cl status now knows the issue" \ | 33 test_expect_success "git-cl status now knows the issue" \ |
| 34 "$GIT_CL status | grep -q 'Issue number'" | 34 "$GIT_CL status | grep -q 'Issue number'" |
| 35 | 35 |
| 36 # Push a description to this URL. | 36 # Push a description to this URL. |
| 37 URL=$($GIT_CL status | sed -ne '/Issue number/s/[^(]*(\(.*\))/\1/p') | 37 URL=$($GIT_CL status | sed -ne '/Issue number/s/[^(]*(\(.*\))/\1/p') |
| 38 curl --cookie dev_appserver_login="test@example.com:False" \ | 38 curl --cookie dev_appserver_login="test@example.com:False" \ |
| 39 --data-urlencode subject="test" \ | 39 --data-urlencode subject="test" \ |
| 40 --data-urlencode description="foo-quux" \ | 40 --data-urlencode description="foo-quux" \ |
| 41 --data-urlencode xsrf_token="$(print_xsrf_token)" \ | 41 --data-urlencode xsrf_token="$(print_xsrf_token)" \ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 55 test_expect_success "upstream svn has our commit" \ | 55 test_expect_success "upstream svn has our commit" \ |
| 56 "svn log $REPO_URL 2>/dev/null | grep -q 'foo-quux'" | 56 "svn log $REPO_URL 2>/dev/null | grep -q 'foo-quux'" |
| 57 ) | 57 ) |
| 58 SUCCESS=$? | 58 SUCCESS=$? |
| 59 | 59 |
| 60 cleanup | 60 cleanup |
| 61 | 61 |
| 62 if [ $SUCCESS == 0 ]; then | 62 if [ $SUCCESS == 0 ]; then |
| 63 echo PASS | 63 echo PASS |
| 64 fi | 64 fi |
| OLD | NEW |