{"action":"created","comment":{"url":"https://api.github.com/repos/SUSE/scf/pulls/comments/148631601","pull_request_review_id":73906146,"id":148631601,"diff_hunk":"@@ -0,0 +1,199 @@\n+#!/bin/bash\n+# # ## ### ##### ######## #############  #####################\n+## Explanations and overview:\n+\n+## This test does a lot of setup to determine that the universal\n+## service broker (cf-usb) is actually working.\n+#\n+## 0. A domain for TCP routing is created, to connect all the pieces.\n+#\n+## 1. A local mysql server is started as an app and made available\n+##    through cf TCP routing.\n+#\n+## 2. The mysql sidecar is started as an app, configured to talk to\n+##    the mysql server from (1).\n+#\n+## 3. The cf-usb is configured to talk to and use the side car.\n+#\n+## 4. Then we can check that mysql appears in the marketplace, create\n+##    a service from it, and check that this service is viewable too.\n+#\n+## In the code below these phases are marked with \"--(N)--\" where N is\n+## the step number.\n+#\n+## Note, the applications of step 1 and 2 are docker apps. This is why\n+## the `pre-start.sh` script enables the `diego_docker` feature-flag\n+## of CF. For step (3) the `pre-start.sh` script extended the `cf`\n+## client with the `cf-usb-plugin` plugin.\n+\n+function get_port\n+{\n+    port=$(awk '/Route .* has been created/ {print $2}' < ${TMP}/$1 | cut -f 2 -d ':')\n+    if [ -z \"${port}\" ]; then\n+\techo \"ERROR: Could not determine the assigned random port number for $1\"\n+\techo \"ERROR: Mapping route to random port failed for $1\"\n+\texit 1\n+    fi\n+    echo $port\n+}\n+\n+function wait_on_port\n+{\n+    for (( i = 0; i < 12 ; i++ )) ; do\n+\tif curl --fail -s -o /dev/null ${CF_TCP_DOMAIN}:$1 ; then\n+            break\n+\tfi\n+\tsleep 5\n+    done\n+    # Last try, any error will abort the test\n+    curl ${CF_TCP_DOMAIN}:$1\n+}\n+\n+## # # ## ### Tracing and common configuration ### ## # #\n+\n+set -o errexit\n+set -o xtrace\n+\n+function random_suffix { head -c2 /dev/urandom | hexdump -e '\"%04x\"'; }\n+CF_ORG=${CF_ORG:-org}-$(random_suffix)\n+CF_SPACE=${CF_SPACE:-space}-$(random_suffix)\n+CF_TCP_DOMAIN=${CF_TCP_DOMAIN:-tcp-$(random_suffix).${CF_DOMAIN}}\n+\n+## # # ## ### Login & standard entity setup/cleanup ### ## # #\n+\n+function login_cleanup() {\n+    trap \"\" EXIT ERR\n+    set +o errexit\n+\n+    cf delete-space -f ${CF_SPACE}\n+    cf delete-org -f ${CF_ORG}\n+\n+    set -o errexit\n+}\n+trap login_cleanup EXIT ERR","path":"src/hcf-release/src/acceptance-tests-brain/test-scripts/008_cf_usb_test.sh","position":73,"original_position":73,"commit_id":"cd51ae0be08c7fdb72dd2a48eaa2fe9eaa375a83","original_commit_id":"cd51ae0be08c7fdb72dd2a48eaa2fe9eaa375a83","user":{"login":"andreas-kupries","id":577247,"avatar_url":"https://avatars0.githubusercontent.com/u/577247?v=4","gravatar_id":"","url":"https://api.github.com/users/andreas-kupries","html_url":"https://github.com/andreas-kupries","followers_url":"https://api.github.com/users/andreas-kupries/followers","following_url":"https://api.github.com/users/andreas-kupries/following{/other_user}","gists_url":"https://api.github.com/users/andreas-kupries/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-kupries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-kupries/subscriptions","organizations_url":"https://api.github.com/users/andreas-kupries/orgs","repos_url":"https://api.github.com/users/andreas-kupries/repos","events_url":"https://api.github.com/users/andreas-kupries/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-kupries/received_events","type":"User","site_admin":false},"body":"Inherited from the template code for testcases, I believe. Will check.","created_at":"2017-11-02T19:05:53Z","updated_at":"2017-11-02T19:05:53Z","html_url":"https://github.com/SUSE/scf/pull/1175#discussion_r148631601","pull_request_url":"https://api.github.com/repos/SUSE/scf/pulls/1175","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SUSE/scf/pulls/comments/148631601"},"html":{"href":"https://github.com/SUSE/scf/pull/1175#discussion_r148631601"},"pull_request":{"href":"https://api.github.com/repos/SUSE/scf/pulls/1175"}},"in_reply_to_id":148623934},"pull_request":{"url":"https://api.github.com/repos/SUSE/scf/pulls/1175","id":150341017,"html_url":"https://github.com/SUSE/scf/pull/1175","diff_url":"https://github.com/SUSE/scf/pull/1175.diff","patch_url":"https://github.com/SUSE/scf/pull/1175.patch","issue_url":"https://api.github.com/repos/SUSE/scf/issues/1175","number":1175,"state":"open","locked":false,"title":"Resurrect the cf-usb test.","user":{"login":"andreas-kupries","id":577247,"avatar_url":"https://avatars0.githubusercontent.com/u/577247?v=4","gravatar_id":"","url":"https://api.github.com/users/andreas-kupries","html_url":"https://github.com/andreas-kupries","followers_url":"https://api.github.com/users/andreas-kupries/followers","following_url":"https://api.github.com/users/andreas-kupries/following{/other_user}","gists_url":"https://api.github.com/users/andreas-kupries/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-kupries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-kupries/subscriptions","organizations_url":"https://api.github.com/users/andreas-kupries/orgs","repos_url":"https://api.github.com/users/andreas-kupries/repos","events_url":"https://api.github.com/users/andreas-kupries/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-kupries/received_events","type":"User","site_admin":false},"body":"https://trello.com/c/vWwV1UJE/426-add-cf-usb-brain-tests-back\r\n\r\npre-start: install the cf-usb plugin for the cf cli\r\nnew test file. details of the test in the comment of that file.","created_at":"2017-11-02T16:30:07Z","updated_at":"2017-11-02T19:05:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"343a9a677356fcf67e4cacca9b9d172e72d747a1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/SUSE/scf/pulls/1175/commits","review_comments_url":"https://api.github.com/repos/SUSE/scf/pulls/1175/comments","review_comment_url":"https://api.github.com/repos/SUSE/scf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SUSE/scf/issues/1175/comments","statuses_url":"https://api.github.com/repos/SUSE/scf/statuses/cd51ae0be08c7fdb72dd2a48eaa2fe9eaa375a83","head":{"label":"SUSE:ak-cf-usb-test-resurrection","ref":"ak-cf-usb-test-resurrection","sha":"cd51ae0be08c7fdb72dd2a48eaa2fe9eaa375a83","user":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":43776718,"name":"scf","full_name":"SUSE/scf","owner":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SUSE/scf","description":"SUSE Cloud Foundry","fork":false,"url":"https://api.github.com/repos/SUSE/scf","forks_url":"https://api.github.com/repos/SUSE/scf/forks","keys_url":"https://api.github.com/repos/SUSE/scf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SUSE/scf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SUSE/scf/teams","hooks_url":"https://api.github.com/repos/SUSE/scf/hooks","issue_events_url":"https://api.github.com/repos/SUSE/scf/issues/events{/number}","events_url":"https://api.github.com/repos/SUSE/scf/events","assignees_url":"https://api.github.com/repos/SUSE/scf/assignees{/user}","branches_url":"https://api.github.com/repos/SUSE/scf/branches{/branch}","tags_url":"https://api.github.com/repos/SUSE/scf/tags","blobs_url":"https://api.github.com/repos/SUSE/scf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SUSE/scf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SUSE/scf/git/refs{/sha}","trees_url":"https://api.github.com/repos/SUSE/scf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SUSE/scf/statuses/{sha}","languages_url":"https://api.github.com/repos/SUSE/scf/languages","stargazers_url":"https://api.github.com/repos/SUSE/scf/stargazers","contributors_url":"https://api.github.com/repos/SUSE/scf/contributors","subscribers_url":"https://api.github.com/repos/SUSE/scf/subscribers","subscription_url":"https://api.github.com/repos/SUSE/scf/subscription","commits_url":"https://api.github.com/repos/SUSE/scf/commits{/sha}","git_commits_url":"https://api.github.com/repos/SUSE/scf/git/commits{/sha}","comments_url":"https://api.github.com/repos/SUSE/scf/comments{/number}","issue_comment_url":"https://api.github.com/repos/SUSE/scf/issues/comments{/number}","contents_url":"https://api.github.com/repos/SUSE/scf/contents/{+path}","compare_url":"https://api.github.com/repos/SUSE/scf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SUSE/scf/merges","archive_url":"https://api.github.com/repos/SUSE/scf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SUSE/scf/downloads","issues_url":"https://api.github.com/repos/SUSE/scf/issues{/number}","pulls_url":"https://api.github.com/repos/SUSE/scf/pulls{/number}","milestones_url":"https://api.github.com/repos/SUSE/scf/milestones{/number}","notifications_url":"https://api.github.com/repos/SUSE/scf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SUSE/scf/labels{/name}","releases_url":"https://api.github.com/repos/SUSE/scf/releases{/id}","deployments_url":"https://api.github.com/repos/SUSE/scf/deployments","created_at":"2015-10-06T20:30:32Z","updated_at":"2017-10-25T04:50:03Z","pushed_at":"2017-11-02T16:30:07Z","git_url":"git://github.com/SUSE/scf.git","ssh_url":"git@github.com:SUSE/scf.git","clone_url":"https://github.com/SUSE/scf.git","svn_url":"https://github.com/SUSE/scf","homepage":"","size":30629,"stargazers_count":10,"watchers_count":10,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":9,"forks":11,"open_issues":9,"watchers":10,"default_branch":"develop"}},"base":{"label":"SUSE:develop","ref":"develop","sha":"bde795ad9b115e2623f9c82690325686a1d3f694","user":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":43776718,"name":"scf","full_name":"SUSE/scf","owner":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SUSE/scf","description":"SUSE Cloud Foundry","fork":false,"url":"https://api.github.com/repos/SUSE/scf","forks_url":"https://api.github.com/repos/SUSE/scf/forks","keys_url":"https://api.github.com/repos/SUSE/scf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SUSE/scf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SUSE/scf/teams","hooks_url":"https://api.github.com/repos/SUSE/scf/hooks","issue_events_url":"https://api.github.com/repos/SUSE/scf/issues/events{/number}","events_url":"https://api.github.com/repos/SUSE/scf/events","assignees_url":"https://api.github.com/repos/SUSE/scf/assignees{/user}","branches_url":"https://api.github.com/repos/SUSE/scf/branches{/branch}","tags_url":"https://api.github.com/repos/SUSE/scf/tags","blobs_url":"https://api.github.com/repos/SUSE/scf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SUSE/scf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SUSE/scf/git/refs{/sha}","trees_url":"https://api.github.com/repos/SUSE/scf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SUSE/scf/statuses/{sha}","languages_url":"https://api.github.com/repos/SUSE/scf/languages","stargazers_url":"https://api.github.com/repos/SUSE/scf/stargazers","contributors_url":"https://api.github.com/repos/SUSE/scf/contributors","subscribers_url":"https://api.github.com/repos/SUSE/scf/subscribers","subscription_url":"https://api.github.com/repos/SUSE/scf/subscription","commits_url":"https://api.github.com/repos/SUSE/scf/commits{/sha}","git_commits_url":"https://api.github.com/repos/SUSE/scf/git/commits{/sha}","comments_url":"https://api.github.com/repos/SUSE/scf/comments{/number}","issue_comment_url":"https://api.github.com/repos/SUSE/scf/issues/comments{/number}","contents_url":"https://api.github.com/repos/SUSE/scf/contents/{+path}","compare_url":"https://api.github.com/repos/SUSE/scf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SUSE/scf/merges","archive_url":"https://api.github.com/repos/SUSE/scf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SUSE/scf/downloads","issues_url":"https://api.github.com/repos/SUSE/scf/issues{/number}","pulls_url":"https://api.github.com/repos/SUSE/scf/pulls{/number}","milestones_url":"https://api.github.com/repos/SUSE/scf/milestones{/number}","notifications_url":"https://api.github.com/repos/SUSE/scf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SUSE/scf/labels{/name}","releases_url":"https://api.github.com/repos/SUSE/scf/releases{/id}","deployments_url":"https://api.github.com/repos/SUSE/scf/deployments","created_at":"2015-10-06T20:30:32Z","updated_at":"2017-10-25T04:50:03Z","pushed_at":"2017-11-02T16:30:07Z","git_url":"git://github.com/SUSE/scf.git","ssh_url":"git@github.com:SUSE/scf.git","clone_url":"https://github.com/SUSE/scf.git","svn_url":"https://github.com/SUSE/scf","homepage":"","size":30629,"stargazers_count":10,"watchers_count":10,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":9,"forks":11,"open_issues":9,"watchers":10,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/SUSE/scf/pulls/1175"},"html":{"href":"https://github.com/SUSE/scf/pull/1175"},"issue":{"href":"https://api.github.com/repos/SUSE/scf/issues/1175"},"comments":{"href":"https://api.github.com/repos/SUSE/scf/issues/1175/comments"},"review_comments":{"href":"https://api.github.com/repos/SUSE/scf/pulls/1175/comments"},"review_comment":{"href":"https://api.github.com/repos/SUSE/scf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SUSE/scf/pulls/1175/commits"},"statuses":{"href":"https://api.github.com/repos/SUSE/scf/statuses/cd51ae0be08c7fdb72dd2a48eaa2fe9eaa375a83"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"andreas-kupries"}}