{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/98083603","pull_request_review_id":18707663,"id":98083603,"diff_hunk":"@@ -0,0 +1,194 @@\n+#!/bin/bash\n+source \"$(dirname \"${BASH_SOURCE}\")/../../hack/lib/init.sh\"\n+trap os::test::junit::reconcile_output EXIT\n+\n+\n+os::util::ensure::built_binary_exists 'oc'\n+export PATH=\"$(dirname \"$( os::util::find::built_binary oc )\")\":\"${PATH}\"\n+\n+function os::test::extended::clusterup::run_test () {\n+    local test=\"${1}\"\n+    local funcname=\"os::test::extended::clusterup::${test}\"\n+    local default_home=\"${HOME}\"\n+    echo \"starting test -- ${test}\"\n+\n+    os::test::junit::declare_suite_start \"extended/clusterup/${test}\"\n+\n+    export HOME=\"$(mktemp -d)\"\n+    pushd \"${HOME}\" &> /dev/null\n+    echo \"Using ${HOME} as home directory\"\n+    ${funcname}\n+    popd &> /dev/null\n+    rm -rf \"${HOME}\"\n+    export HOME=\"${default_home}\"\n+\n+    echo \"cluster up -- ${test}: ok\"\n+    os::test::junit::declare_suite_end\n+}\n+\n+function os::test::extended::clusterup::verify_router_and_registry () {\n+    os::cmd::expect_success \"oc login -u system:admin\"\n+    os::cmd::expect_success_and_text \"oc get svc -n default\" \"docker-registry\"\n+    os::cmd::expect_success_and_text \"oc get svc -n default\" \"router\"\n+    os::cmd::try_until_success \"oc get endpoints docker-registry -n default | grep ':5000'\" $(( 10*minute )) 1\n+    os::cmd::try_until_success \"oc get endpoints router -n default | grep ':80'\" $(( 10*minute )) 1\n+    os::cmd::expect_success \"oc login -u developer\"\n+}\n+\n+function os::test::extended::clusterup::verify_image_streams () {\n+    os::cmd::try_until_success \"oc get is -n openshift ruby -o jsonpath='{ .status.tags[*].tag }' | grep latest\" $(( 10*minute )) 1\n+}\n+\n+function os::test::extended::clusterup::verify_ruby_build () {\n+    os::cmd::expect_success \"oc new-app https://github.com/openshift/ruby-hello-world.git\"\n+    os::cmd::try_until_success \"oc get builds -l app=ruby-hello-world | grep 'Complete'\" $(( 10*minute )) 1\n+}\n+\n+function os::test::extended::clusterup::verify_persistent_volumes () {\n+    os::cmd::expect_success \"oc login -u system:admin\"\n+    os::cmd::expect_success_and_text \"oc get jobs -n default\" \"persistent-volume-setup\"\n+    os::cmd::try_until_success \"oc get job persistent-volume-setup -n default -o jsonpath='{ .status.succeeded }' | grep 1\" $(( 10*minute )) 1\n+    os::cmd::expect_success \"oc get pv/pv0100\"\n+    os::cmd::expect_success \"oc login -u developer\"\n+}\n+\n+function os::test::extended::clusterup::verify_metrics () {\n+    os::cmd::expect_success \"oc login -u system:admin\"\n+    os::cmd::expect_success_and_text \"oc get pods -n openshift-infra\" \"metrics-deployer\"\n+    os::cmd::try_until_success \"oc get pods -n openshift-infra -l job-name=metrics-deployer-pod | grep Completed\" $(( 10*minute )) 1\n+    os::cmd::try_until_success \"oc get endpoints -n openshift-infra\"\n+    os::cmd::expect_success \"oc login -u developer\"\n+}\n+\n+function os::test::extended::clusterup::verify_logging () {\n+    os::cmd::expect_success \"oc login -u system:admin\"\n+    os::cmd::expect_success_and_text \"oc get pods -n logging\" \"logging-deployer\"\n+    os::cmd::try_until_success \"oc get pods -n logging -l logging-infra=deployer | grep Completed\" $(( 10*minute )) 1\n+    os::cmd::try_until_success \"oc get endpoints logging-kibana -n logging | grep ':3000'\" $(( 10*minute )) 1\n+    os::cmd::expect_success \"oc login -u developer\"\n+}\n+\n+function os::test::extended::clusterup::standard_test () {\n+    local cmd=\"oc cluster up $@\"\n+    os::cmd::expect_success \"${cmd}\"\n+    os::test::extended::clusterup::verify_router_and_registry\n+    os::test::extended::clusterup::verify_image_streams\n+    os::test::extended::clusterup::verify_ruby_build\n+    os::test::extended::clusterup::verify_persistent_volumes\n+}\n+\n+\n+# Test with host dirs specified\n+function os::test::extended::clusterup::internal::hostdirs () {\n+    local data_dir=\"$(mktemp -d)\"\n+    local config_dir=\"$(mktemp -d)\"\n+    local pv_dir=\"$(mktemp -d)\"\n+    local volumes_dir=\"$(mktemp -d)\"\n+    local volumes_arg=\"\"\n+    if [[ \"$(uname)\" == \"Linux\" ]]; then\n+        volumes_arg=\"--host-volumes-dir=${volumes_dir}\"\n+    fi\n+    os::test::extended::clusterup::standard_test \\\n+        --host-data-dir=\"${data_dir}\" \\\n+        --host-config-dir=\"${config_dir}\" \\\n+        --host-pv-dir=\"${pv_dir}\" \\\n+        ${volumes_arg}\n+\n+    os::cmd::expect_success \"ls ${config_dir}/master/master-config.yaml\"\n+    os::cmd::expect_success \"ls ${pv_dir}/pv0100\"\n+    os::cmd::expect_success \"ls ${data_dir}/member\"\n+    os::cmd::expect_success \"oc cluster down\"\n+}\n+\n+# Tests the simplest case, no arguments specified\n+function os::test::extended::clusterup::noargs () {\n+    os::test::extended::clusterup::standard_test\n+    os::cmd::expect_success \"oc cluster down\"\n+}\n+\n+# Tests creating a cluster with specific host directories\n+function os::test::extended::clusterup::hostdirs () {\n+    local tmp=\"${TMPDIR}\"\n+    if [[ \"$(uname)\" == \"Darwin\" ]]; then\n+        tmp=\"/tmp\"\n+    fi\n+    TMPDIR=\"${tmp}\" os::test::extended::clusterup::internal::hostdirs\n+}\n+\n+# Tests creating a cluster with an alternate image and tag\n+function os::test::extended::clusterup::image () {\n+    os::test::extended::clusterup::standard_test \\\n+        --image=\"registry.access.redhat.com/openshift3/ose\" \\\n+        --version=\"v3.3\"\n+    os::cmd::expect_success_and_text \"docker inspect origin\" \"registry.access.redhat.com/openshift3/ose:v3.3\"\n+    os::cmd::expect_success \"oc cluster down\"\n+}\n+\n+# Tests creating a cluster with a public hostname\n+function os::test::extended::clusterup::publichostname () {\n+    os::test::extended::clusterup::standard_test \\\n+        --public-hostname=\"my.server.name\"\n+    os::cmd::expect_success \"docker exec origin cat /var/lib/origin/openshift.local.config/master/master-config.yaml | grep 'masterPublicURL.*my\\.server\\.name'\"","path":"test/extended/clusterup.sh","position":131,"original_position":131,"commit_id":"7ae448f4defb8ca6086975902a80370d787cface","original_commit_id":"7ae448f4defb8ca6086975902a80370d787cface","user":{"login":"stevekuznetsov","id":7328370,"avatar_url":"https://avatars.githubusercontent.com/u/7328370?v=3","gravatar_id":"","url":"https://api.github.com/users/stevekuznetsov","html_url":"https://github.com/stevekuznetsov","followers_url":"https://api.github.com/users/stevekuznetsov/followers","following_url":"https://api.github.com/users/stevekuznetsov/following{/other_user}","gists_url":"https://api.github.com/users/stevekuznetsov/gists{/gist_id}","starred_url":"https://api.github.com/users/stevekuznetsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevekuznetsov/subscriptions","organizations_url":"https://api.github.com/users/stevekuznetsov/orgs","repos_url":"https://api.github.com/users/stevekuznetsov/repos","events_url":"https://api.github.com/users/stevekuznetsov/events{/privacy}","received_events_url":"https://api.github.com/users/stevekuznetsov/received_events","type":"User","site_admin":false},"body":"`expect_success_and_text` not `grep`","created_at":"2017-01-26T20:24:44Z","updated_at":"2017-01-26T20:29:31Z","html_url":"https://github.com/openshift/origin/pull/12683#discussion_r98083603","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/12683","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/98083603"},"html":{"href":"https://github.com/openshift/origin/pull/12683#discussion_r98083603"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/12683"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/12683","id":103374726,"html_url":"https://github.com/openshift/origin/pull/12683","diff_url":"https://github.com/openshift/origin/pull/12683.diff","patch_url":"https://github.com/openshift/origin/pull/12683.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/12683","number":12683,"state":"open","locked":false,"title":"[WIP] Fix port checking for cluster up and add extended tests","user":{"login":"csrwng","id":5834976,"avatar_url":"https://avatars.githubusercontent.com/u/5834976?v=3","gravatar_id":"","url":"https://api.github.com/users/csrwng","html_url":"https://github.com/csrwng","followers_url":"https://api.github.com/users/csrwng/followers","following_url":"https://api.github.com/users/csrwng/following{/other_user}","gists_url":"https://api.github.com/users/csrwng/gists{/gist_id}","starred_url":"https://api.github.com/users/csrwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csrwng/subscriptions","organizations_url":"https://api.github.com/users/csrwng/orgs","repos_url":"https://api.github.com/users/csrwng/repos","events_url":"https://api.github.com/users/csrwng/events{/privacy}","received_events_url":"https://api.github.com/users/csrwng/received_events","type":"User","site_admin":false},"body":"Adds a set of extended tests for cluster up and fixes the following issues:\r\n- cluster up won't start on a machine where dnsmasq is bound to port 53 on a certain interface\r\n- on a clean Docker for Mac install, cluster up won't create directory shares and fail\r\n- login fails on Docker for Mac when a non-numeric public hostname is specified","created_at":"2017-01-26T19:41:14Z","updated_at":"2017-01-26T20:29:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02943a05878601dd055f18d56e8c69d9641a3907","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/12683/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/12683/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/12683/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/7ae448f4defb8ca6086975902a80370d787cface","head":{"label":"csrwng:clusterup_ext_tests","ref":"clusterup_ext_tests","sha":"7ae448f4defb8ca6086975902a80370d787cface","user":{"login":"csrwng","id":5834976,"avatar_url":"https://avatars.githubusercontent.com/u/5834976?v=3","gravatar_id":"","url":"https://api.github.com/users/csrwng","html_url":"https://github.com/csrwng","followers_url":"https://api.github.com/users/csrwng/followers","following_url":"https://api.github.com/users/csrwng/following{/other_user}","gists_url":"https://api.github.com/users/csrwng/gists{/gist_id}","starred_url":"https://api.github.com/users/csrwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csrwng/subscriptions","organizations_url":"https://api.github.com/users/csrwng/orgs","repos_url":"https://api.github.com/users/csrwng/repos","events_url":"https://api.github.com/users/csrwng/events{/privacy}","received_events_url":"https://api.github.com/users/csrwng/received_events","type":"User","site_admin":false},"repo":{"id":23592505,"name":"origin","full_name":"csrwng/origin","owner":{"login":"csrwng","id":5834976,"avatar_url":"https://avatars.githubusercontent.com/u/5834976?v=3","gravatar_id":"","url":"https://api.github.com/users/csrwng","html_url":"https://github.com/csrwng","followers_url":"https://api.github.com/users/csrwng/followers","following_url":"https://api.github.com/users/csrwng/following{/other_user}","gists_url":"https://api.github.com/users/csrwng/gists{/gist_id}","starred_url":"https://api.github.com/users/csrwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csrwng/subscriptions","organizations_url":"https://api.github.com/users/csrwng/orgs","repos_url":"https://api.github.com/users/csrwng/repos","events_url":"https://api.github.com/users/csrwng/events{/privacy}","received_events_url":"https://api.github.com/users/csrwng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/csrwng/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/csrwng/origin","forks_url":"https://api.github.com/repos/csrwng/origin/forks","keys_url":"https://api.github.com/repos/csrwng/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/csrwng/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/csrwng/origin/teams","hooks_url":"https://api.github.com/repos/csrwng/origin/hooks","issue_events_url":"https://api.github.com/repos/csrwng/origin/issues/events{/number}","events_url":"https://api.github.com/repos/csrwng/origin/events","assignees_url":"https://api.github.com/repos/csrwng/origin/assignees{/user}","branches_url":"https://api.github.com/repos/csrwng/origin/branches{/branch}","tags_url":"https://api.github.com/repos/csrwng/origin/tags","blobs_url":"https://api.github.com/repos/csrwng/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/csrwng/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/csrwng/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/csrwng/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/csrwng/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/csrwng/origin/languages","stargazers_url":"https://api.github.com/repos/csrwng/origin/stargazers","contributors_url":"https://api.github.com/repos/csrwng/origin/contributors","subscribers_url":"https://api.github.com/repos/csrwng/origin/subscribers","subscription_url":"https://api.github.com/repos/csrwng/origin/subscription","commits_url":"https://api.github.com/repos/csrwng/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/csrwng/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/csrwng/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/csrwng/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/csrwng/origin/contents/{+path}","compare_url":"https://api.github.com/repos/csrwng/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/csrwng/origin/merges","archive_url":"https://api.github.com/repos/csrwng/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/csrwng/origin/downloads","issues_url":"https://api.github.com/repos/csrwng/origin/issues{/number}","pulls_url":"https://api.github.com/repos/csrwng/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/csrwng/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/csrwng/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/csrwng/origin/labels{/name}","releases_url":"https://api.github.com/repos/csrwng/origin/releases{/id}","deployments_url":"https://api.github.com/repos/csrwng/origin/deployments","created_at":"2014-09-02T19:29:25Z","updated_at":"2016-01-11T13:43:26Z","pushed_at":"2017-01-26T19:37:31Z","git_url":"git://github.com/csrwng/origin.git","ssh_url":"git@github.com:csrwng/origin.git","clone_url":"https://github.com/csrwng/origin.git","svn_url":"https://github.com/csrwng/origin","homepage":"https://openshift.github.io","size":501939,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"36987f0a11e374a21abfbdf4237e935e01a983d6","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"Enterprise Kubernetes for Developers","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2017-01-26T19:44:16Z","pushed_at":"2017-01-26T20:28:26Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":502194,"stargazers_count":2310,"watchers_count":2310,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1559,"mirror_url":null,"open_issues_count":1048,"forks":1559,"open_issues":1048,"watchers":2310,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/12683"},"html":{"href":"https://github.com/openshift/origin/pull/12683"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/12683"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/12683/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/12683/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/12683/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/7ae448f4defb8ca6086975902a80370d787cface"}}}}
{"actor":{"display_login":"stevekuznetsov"}}