| OLD | NEW |
| 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 set -e | 7 set -e |
| 8 | 8 |
| 9 . ./test-lib.sh | 9 . ./test-lib.sh |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 --data-urlencode xsrf_token="$(print_xsrf_token)" \ | 45 --data-urlencode xsrf_token="$(print_xsrf_token)" \ |
| 46 $URL/edit | 46 $URL/edit |
| 47 | 47 |
| 48 API=$(echo $URL | sed -e 's/\([0-9]\+\)$/api\/\1/') | 48 API=$(echo $URL | sed -e 's/\([0-9]\+\)$/api\/\1/') |
| 49 test_expect_success "Base URL contains branch name" \ | 49 test_expect_success "Base URL contains branch name" \ |
| 50 "curl -s $API | python -mjson.tool | grep base_url | grep -q '@master'" | 50 "curl -s $API | python -mjson.tool | grep base_url | grep -q '@master'" |
| 51 | 51 |
| 52 test_expect_success "git-cl land ok" \ | 52 test_expect_success "git-cl land ok" \ |
| 53 "$GIT_CL land -f --no-oauth2" | 53 "$GIT_CL land -f --no-oauth2" |
| 54 | 54 |
| 55 test_expect_success "branch still has an issue" \ |
| 56 "$GIT_CL_STATUS | grep -q 'Issue number'" |
| 57 |
| 55 git checkout -q master > /dev/null 2>&1 | 58 git checkout -q master > /dev/null 2>&1 |
| 56 git pull -q > /dev/null 2>&1 | 59 git pull -q > /dev/null 2>&1 |
| 57 | 60 |
| 58 test_expect_success "committed code has proper description" \ | 61 test_expect_success "committed code has proper description" \ |
| 59 "git show | grep -q 'foo-quux'" | 62 "git show | grep -q 'foo-quux'" |
| 60 | 63 |
| 61 test_expect_success "issue no longer has a branch" \ | |
| 62 "$GIT_CL_STATUS | grep -q 'work : None'" | |
| 63 | |
| 64 cd $GITREPO_PATH | 64 cd $GITREPO_PATH |
| 65 test_expect_success "upstream repo has our commit" \ | 65 test_expect_success "upstream repo has our commit" \ |
| 66 "git log master 2>/dev/null | grep -q 'foo-quux'" | 66 "git log master 2>/dev/null | grep -q 'foo-quux'" |
| 67 ) | 67 ) |
| 68 SUCCESS=$? | 68 SUCCESS=$? |
| 69 | 69 |
| 70 cleanup | 70 cleanup |
| 71 | 71 |
| 72 if [ $SUCCESS == 0 ]; then | 72 if [ $SUCCESS == 0 ]; then |
| 73 echo PASS | 73 echo PASS |
| 74 fi | 74 fi |
| OLD | NEW |