From 6df844a49c2631fd38940db4679ab1cba760e4ab Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 23 Jan 2016 02:40:04 -0500 Subject: [PATCH] wrap long lines Use line continuations to keep lines shorter than 80 columns. --- tools/build_test_env.sh | 9 ++++++--- tools/functional_tests.sh | 26 ++++++++++++++++++-------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/tools/build_test_env.sh b/tools/build_test_env.sh index bb185f344..9be9035fd 100755 --- a/tools/build_test_env.sh +++ b/tools/build_test_env.sh @@ -33,7 +33,8 @@ case $PY_VER in exit 1;; esac -docker run --name gitlab-test --detach --publish 8080:80 --publish 2222:22 gpocentek/test-python-gitlab:latest >/dev/null 2>&1 +docker run --name gitlab-test --detach --publish 8080:80 \ + --publish 2222:22 gpocentek/test-python-gitlab:latest >/dev/null 2>&1 LOGIN='root' PASSWORD='5iveL!fe' @@ -46,7 +47,8 @@ echo -n "Waiting for gitlab to come online... " I=0 while :; do sleep 5 - curl -s http://localhost:8080/users/sign_in 2>/dev/null | grep -q "GitLab Community Edition" && break + curl -s http://localhost:8080/users/sign_in 2>/dev/null \ + | grep -q "GitLab Community Edition" && break let I=I+5 [ $I -eq 120 ] && exit 1 done @@ -57,7 +59,8 @@ $OK TOKEN=$(curl -s http://localhost:8080/api/v3/session \ -X POST \ --data "login=$LOGIN&password=$PASSWORD" \ - | python -c 'import sys, json; print(json.load(sys.stdin)["private_token"])') + | python -c \ + 'import sys, json; print(json.load(sys.stdin)["private_token"])') cat > $CONFIG << EOF [global] diff --git a/tools/functional_tests.sh b/tools/functional_tests.sh index 6cb868dcc..b4e45b0a2 100755 --- a/tools/functional_tests.sh +++ b/tools/functional_tests.sh @@ -46,7 +46,8 @@ sleep 20 set -e echo -n "Testing project creation... " -PROJECT_ID=$($GITLAB project create --name test-project1 | grep ^id: | cut -d' ' -f2) +PROJECT_ID=$($GITLAB project create --name test-project1 \ + | grep ^id: | cut -d' ' -f2) $GITLAB project list | grep -q test-project1 $OK @@ -55,7 +56,8 @@ $GITLAB project update --id $PROJECT_ID --description "My New Description" $OK echo -n "Testing user creation... " -USER_ID=$($GITLAB user create --email fake@email.com --username user1 --name "User One" --password fakepassword | grep ^id: | cut -d' ' -f2) +USER_ID=$($GITLAB user create --email fake@email.com --username user1 \ + --name "User One" --password fakepassword | grep ^id: | cut -d' ' -f2) $OK echo -n "Testing verbose output... " @@ -67,27 +69,35 @@ $GITLAB -v user list | grep -qv config-file $OK echo -n "Testing adding member to a project... " -$GITLAB project-member create --project-id $PROJECT_ID --user-id $USER_ID --access-level 40 >/dev/null 2>&1 +$GITLAB project-member create --project-id $PROJECT_ID \ + --user-id $USER_ID --access-level 40 >/dev/null 2>&1 $OK echo -n "Testing file creation... " -$GITLAB project-file create --project-id $PROJECT_ID --file-path README --branch-name master --content "CONTENT" --commit-message "Initial commit" >/dev/null 2>&1 +$GITLAB project-file create --project-id $PROJECT_ID \ + --file-path README --branch-name master --content "CONTENT" \ + --commit-message "Initial commit" >/dev/null 2>&1 $OK echo -n "Testing issue creation... " -ISSUE_ID=$($GITLAB project-issue create --project-id $PROJECT_ID --title "my issue" --description "my issue description" | grep ^id: | cut -d' ' -f2) +ISSUE_ID=$($GITLAB project-issue create --project-id $PROJECT_ID \ + --title "my issue" --description "my issue description" \ + | grep ^id: | cut -d' ' -f2) $OK echo -n "Testing note creation... " -$GITLAB project-issue-note create --project-id $PROJECT_ID --issue-id $ISSUE_ID --body "the body" >/dev/null 2>&1 +$GITLAB project-issue-note create --project-id $PROJECT_ID \ + --issue-id $ISSUE_ID --body "the body" >/dev/null 2>&1 $OK echo -n "Testing branch creation... " -$GITLAB project-branch create --project-id $PROJECT_ID --branch-name branch1 --ref master >/dev/null 2>&1 +$GITLAB project-branch create --project-id $PROJECT_ID \ + --branch-name branch1 --ref master >/dev/null 2>&1 $OK echo -n "Testing branch deletion... " -$GITLAB project-branch delete --project-id $PROJECT_ID --name branch1 >/dev/null 2>&1 +$GITLAB project-branch delete --project-id $PROJECT_ID \ + --name branch1 >/dev/null 2>&1 $OK echo -n "Testing project deletion... "