Skip to content

Commit

Permalink
wrap long lines
Browse files Browse the repository at this point in the history
Use line continuations to keep lines shorter than 80 columns.
  • Loading branch information
rhansen committed Jan 31, 2016
1 parent 770dd4b commit 6df844a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
9 changes: 6 additions & 3 deletions tools/build_test_env.sh
Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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]
Expand Down
26 changes: 18 additions & 8 deletions tools/functional_tests.sh
Expand Up @@ -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

Expand All @@ -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... "
Expand All @@ -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... "
Expand Down

0 comments on commit 6df844a

Please sign in to comment.