| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,7 +71,7 @@ CONFIG=/tmp/python-gitlab.cfg | |||
| 71 | 71 | GITLAB="gitlab --config-file $CONFIG" | |
| 72 | 72 | GREEN='\033[0;32m' | |
| 73 | 73 | NC='\033[0m' | |
| 74 | - OK="echo -e ${GREEN}OK${NC}" | ||
| 74 | + OK() { echo -e ${GREEN}OK${NC}; } | ||
| 75 | 75 | ||
| 76 | 76 | log "Waiting for gitlab to come online... " | |
| 77 | 77 | I=0 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,57 +24,57 @@ echo -n "Testing project creation... " | |||
| 24 | 24 | PROJECT_ID=$($GITLAB project create --name test-project1 \ | |
| 25 | 25 | | grep ^id: | cut -d' ' -f2) | |
| 26 | 26 | $GITLAB project list | grep -q test-project1 | |
| 27 | - $OK | ||
| 27 | + OK | ||
| 28 | 28 | ||
| 29 | 29 | echo -n "Testing project update... " | |
| 30 | 30 | $GITLAB project update --id $PROJECT_ID --description "My New Description" | |
| 31 | - $OK | ||
| 31 | + OK | ||
| 32 | 32 | ||
| 33 | 33 | echo -n "Testing user creation... " | |
| 34 | 34 | USER_ID=$($GITLAB user create --email fake@email.com --username user1 \ | |
| 35 | 35 | --name "User One" --password fakepassword | grep ^id: | cut -d' ' -f2) | |
| 36 | - $OK | ||
| 36 | + OK | ||
| 37 | 37 | ||
| 38 | 38 | echo -n "Testing verbose output... " | |
| 39 | 39 | $GITLAB -v user list | grep -q avatar-url | |
| 40 | - $OK | ||
| 40 | + OK | ||
| 41 | 41 | ||
| 42 | 42 | echo -n "Testing CLI args not in output... " | |
| 43 | 43 | $GITLAB -v user list | grep -qv config-file | |
| 44 | - $OK | ||
| 44 | + OK | ||
| 45 | 45 | ||
| 46 | 46 | echo -n "Testing adding member to a project... " | |
| 47 | 47 | $GITLAB project-member create --project-id $PROJECT_ID \ | |
| 48 | 48 | --user-id $USER_ID --access-level 40 >/dev/null 2>&1 | |
| 49 | - $OK | ||
| 49 | + OK | ||
| 50 | 50 | ||
| 51 | 51 | echo -n "Testing file creation... " | |
| 52 | 52 | $GITLAB project-file create --project-id $PROJECT_ID \ | |
| 53 | 53 | --file-path README --branch-name master --content "CONTENT" \ | |
| 54 | 54 | --commit-message "Initial commit" >/dev/null 2>&1 | |
| 55 | - $OK | ||
| 55 | + OK | ||
| 56 | 56 | ||
| 57 | 57 | echo -n "Testing issue creation... " | |
| 58 | 58 | ISSUE_ID=$($GITLAB project-issue create --project-id $PROJECT_ID \ | |
| 59 | 59 | --title "my issue" --description "my issue description" \ | |
| 60 | 60 | | grep ^id: | cut -d' ' -f2) | |
| 61 | - $OK | ||
| 61 | + OK | ||
| 62 | 62 | ||
| 63 | 63 | echo -n "Testing note creation... " | |
| 64 | 64 | $GITLAB project-issue-note create --project-id $PROJECT_ID \ | |
| 65 | 65 | --issue-id $ISSUE_ID --body "the body" >/dev/null 2>&1 | |
| 66 | - $OK | ||
| 66 | + OK | ||
| 67 | 67 | ||
| 68 | 68 | echo -n "Testing branch creation... " | |
| 69 | 69 | $GITLAB project-branch create --project-id $PROJECT_ID \ | |
| 70 | 70 | --branch-name branch1 --ref master >/dev/null 2>&1 | |
| 71 | - $OK | ||
| 71 | + OK | ||
| 72 | 72 | ||
| 73 | 73 | echo -n "Testing branch deletion... " | |
| 74 | 74 | $GITLAB project-branch delete --project-id $PROJECT_ID \ | |
| 75 | 75 | --name branch1 >/dev/null 2>&1 | |
| 76 | - $OK | ||
| 76 | + OK | ||
| 77 | 77 | ||
| 78 | 78 | echo -n "Testing project deletion... " | |
| 79 | 79 | $GITLAB project delete --id $PROJECT_ID | |
| 80 | - $OK | ||
| 80 | + OK | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments