{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/comments/132971276","pull_request_review_id":56099951,"id":132971276,"diff_hunk":"@@ -0,0 +1,100 @@\n+import json\n+\n+import pytest\n+\n+import sdk_cmd\n+import sdk_install\n+import sdk_networks\n+import sdk_plan\n+import sdk_security\n+import sdk_utils\n+\n+\n+from tests.test_utils import  *\n+\n+# Name of the broker TLS vip\n+BROKER_TLS_ENDPOINT = 'broker-tls'\n+\n+\n+@pytest.fixture(scope='module')\n+def dcos_security_cli():\n+    \"\"\"\n+    Installs the dcos enterprise cli.\n+    \"\"\"\n+\n+    sdk_cmd.run_cli(\"package install --yes dcos-enterprise-cli\")\n+\n+\n+@pytest.fixture(scope='module')\n+def service_account(dcos_security_cli):\n+    \"\"\"\n+    Creates service account with `hello-world` name and yields the name.\n+    \"\"\"\n+    name = 'kafka'\n+    sdk_security.create_service_account(\n+        service_account_name=name, secret_name=name)\n+    # TODO(mh): Fine grained permissions needs to be addressed in DCOS-16475\n+    sdk_cmd.run_cli(\n+        \"security org groups add_user superusers {name}\".format(name=name))\n+    yield name\n+    sdk_security.delete_service_account(\n+        service_account_name=name, secret_name=name)\n+\n+\n+@pytest.fixture(scope='module')\n+def kafka_service_tls(service_account):\n+    sdk_install.install(\n+        PACKAGE_NAME,\n+        DEFAULT_BROKER_COUNT,\n+        service_name=service_account,\n+        additional_options={\n+            \"service\": {\n+                \"secret_name\": service_account,\n+                \"principal\": service_account,\n+                \"tls\": True,\n+            }\n+        }\n+    )\n+\n+    sdk_plan.wait_for_completed_deployment(PACKAGE_NAME)\n+\n+    # Wait for service health check to pass\n+    shakedown.service_healthy(PACKAGE_NAME)\n+\n+    yield service_account\n+\n+    sdk_install.uninstall(PACKAGE_NAME)\n+\n+\n+@pytest.mark.tls\n+@pytest.mark.smoke\n+@pytest.mark.sanity\n+@sdk_utils.dcos_1_10_or_higher\n+def test_tls_endpoints(kafka_service_tls):\n+    endpoints = sdk_networks.get_and_test_endpoints(\"\", PACKAGE_NAME, 3)\n+    assert BROKER_TLS_ENDPOINT in endpoints\n+\n+    # Test that broker-tls endpoint is available\n+    endpoint_tls = service_cli(\n+        'endpoints {name}'.format(name=BROKER_TLS_ENDPOINT)\n+    )\n+    assert len(endpoint_tls['dns']) == DEFAULT_BROKER_COUNT\n+\n+\n+@pytest.mark.tls\n+@pytest.mark.smoke\n+@pytest.mark.sanity\n+@sdk_utils.dcos_1_10_or_higher","path":"frameworks/kafka/tests/test_tls.py","position":79,"original_position":87,"commit_id":"8ab60575ef93a07ac3776185f7201c26fd933a26","original_commit_id":"6ada7b94c0281466d28e465b3cd31c2a3c90f5d1","user":{"login":"benclarkwood","id":4732025,"avatar_url":"https://avatars3.githubusercontent.com/u/4732025?v=4","gravatar_id":"","url":"https://api.github.com/users/benclarkwood","html_url":"https://github.com/benclarkwood","followers_url":"https://api.github.com/users/benclarkwood/followers","following_url":"https://api.github.com/users/benclarkwood/following{/other_user}","gists_url":"https://api.github.com/users/benclarkwood/gists{/gist_id}","starred_url":"https://api.github.com/users/benclarkwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benclarkwood/subscriptions","organizations_url":"https://api.github.com/users/benclarkwood/orgs","repos_url":"https://api.github.com/users/benclarkwood/repos","events_url":"https://api.github.com/users/benclarkwood/events{/privacy}","received_events_url":"https://api.github.com/users/benclarkwood/received_events","type":"User","site_admin":false},"body":"I'll figure out Python imports someday :/","created_at":"2017-08-14T14:52:07Z","updated_at":"2017-08-14T14:53:08Z","html_url":"https://github.com/mesosphere/dcos-commons/pull/1411#discussion_r132971276","pull_request_url":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/1411","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/comments/132971276"},"html":{"href":"https://github.com/mesosphere/dcos-commons/pull/1411#discussion_r132971276"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/1411"}}},"pull_request":{"url":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/1411","id":135075436,"html_url":"https://github.com/mesosphere/dcos-commons/pull/1411","diff_url":"https://github.com/mesosphere/dcos-commons/pull/1411.diff","patch_url":"https://github.com/mesosphere/dcos-commons/pull/1411.patch","issue_url":"https://api.github.com/repos/mesosphere/dcos-commons/issues/1411","number":1411,"state":"open","locked":false,"title":"[KAF-341] Add TLS support in Kafka","user":{"login":"mhrabovcin","id":81354,"avatar_url":"https://avatars2.githubusercontent.com/u/81354?v=4","gravatar_id":"","url":"https://api.github.com/users/mhrabovcin","html_url":"https://github.com/mhrabovcin","followers_url":"https://api.github.com/users/mhrabovcin/followers","following_url":"https://api.github.com/users/mhrabovcin/following{/other_user}","gists_url":"https://api.github.com/users/mhrabovcin/gists{/gist_id}","starred_url":"https://api.github.com/users/mhrabovcin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhrabovcin/subscriptions","organizations_url":"https://api.github.com/users/mhrabovcin/orgs","repos_url":"https://api.github.com/users/mhrabovcin/repos","events_url":"https://api.github.com/users/mhrabovcin/events{/privacy}","received_events_url":"https://api.github.com/users/mhrabovcin/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-10T09:09:10Z","updated_at":"2017-08-14T14:53:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87c2473186c0cd2d9fd3e1943ddfe8c20c872a9d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/1411/commits","review_comments_url":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/1411/comments","review_comment_url":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/dcos-commons/issues/1411/comments","statuses_url":"https://api.github.com/repos/mesosphere/dcos-commons/statuses/8ab60575ef93a07ac3776185f7201c26fd933a26","head":{"label":"mesosphere:mh/tls-kafka","ref":"mh/tls-kafka","sha":"8ab60575ef93a07ac3776185f7201c26fd933a26","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars0.githubusercontent.com/u/3458585?v=4","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":60286497,"name":"dcos-commons","full_name":"mesosphere/dcos-commons","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars0.githubusercontent.com/u/3458585?v=4","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/dcos-commons","description":"Simplifying stateful services","fork":false,"url":"https://api.github.com/repos/mesosphere/dcos-commons","forks_url":"https://api.github.com/repos/mesosphere/dcos-commons/forks","keys_url":"https://api.github.com/repos/mesosphere/dcos-commons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/dcos-commons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/dcos-commons/teams","hooks_url":"https://api.github.com/repos/mesosphere/dcos-commons/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/dcos-commons/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/dcos-commons/events","assignees_url":"https://api.github.com/repos/mesosphere/dcos-commons/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/dcos-commons/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/dcos-commons/tags","blobs_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/dcos-commons/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/dcos-commons/languages","stargazers_url":"https://api.github.com/repos/mesosphere/dcos-commons/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/dcos-commons/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/dcos-commons/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/dcos-commons/subscription","commits_url":"https://api.github.com/repos/mesosphere/dcos-commons/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/dcos-commons/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/dcos-commons/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/dcos-commons/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/dcos-commons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/dcos-commons/merges","archive_url":"https://api.github.com/repos/mesosphere/dcos-commons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/dcos-commons/downloads","issues_url":"https://api.github.com/repos/mesosphere/dcos-commons/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/dcos-commons/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/dcos-commons/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/dcos-commons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/dcos-commons/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/dcos-commons/releases{/id}","deployments_url":"https://api.github.com/repos/mesosphere/dcos-commons/deployments","created_at":"2016-06-02T18:09:08Z","updated_at":"2017-08-09T03:20:40Z","pushed_at":"2017-08-14T14:52:26Z","git_url":"git://github.com/mesosphere/dcos-commons.git","ssh_url":"git@github.com:mesosphere/dcos-commons.git","clone_url":"https://github.com/mesosphere/dcos-commons.git","svn_url":"https://github.com/mesosphere/dcos-commons","homepage":"https://mesosphere.github.io/dcos-commons/","size":51130,"stargazers_count":85,"watchers_count":85,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":80,"mirror_url":null,"open_issues_count":68,"forks":80,"open_issues":68,"watchers":85,"default_branch":"master"}},"base":{"label":"mesosphere:master","ref":"master","sha":"f1c864ab34f3da926946d0323a8e8243a1b6cbe0","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars0.githubusercontent.com/u/3458585?v=4","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":60286497,"name":"dcos-commons","full_name":"mesosphere/dcos-commons","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars0.githubusercontent.com/u/3458585?v=4","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/dcos-commons","description":"Simplifying stateful services","fork":false,"url":"https://api.github.com/repos/mesosphere/dcos-commons","forks_url":"https://api.github.com/repos/mesosphere/dcos-commons/forks","keys_url":"https://api.github.com/repos/mesosphere/dcos-commons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/dcos-commons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/dcos-commons/teams","hooks_url":"https://api.github.com/repos/mesosphere/dcos-commons/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/dcos-commons/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/dcos-commons/events","assignees_url":"https://api.github.com/repos/mesosphere/dcos-commons/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/dcos-commons/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/dcos-commons/tags","blobs_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/dcos-commons/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/dcos-commons/languages","stargazers_url":"https://api.github.com/repos/mesosphere/dcos-commons/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/dcos-commons/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/dcos-commons/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/dcos-commons/subscription","commits_url":"https://api.github.com/repos/mesosphere/dcos-commons/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/dcos-commons/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/dcos-commons/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/dcos-commons/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/dcos-commons/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/dcos-commons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/dcos-commons/merges","archive_url":"https://api.github.com/repos/mesosphere/dcos-commons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/dcos-commons/downloads","issues_url":"https://api.github.com/repos/mesosphere/dcos-commons/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/dcos-commons/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/dcos-commons/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/dcos-commons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/dcos-commons/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/dcos-commons/releases{/id}","deployments_url":"https://api.github.com/repos/mesosphere/dcos-commons/deployments","created_at":"2016-06-02T18:09:08Z","updated_at":"2017-08-09T03:20:40Z","pushed_at":"2017-08-14T14:52:26Z","git_url":"git://github.com/mesosphere/dcos-commons.git","ssh_url":"git@github.com:mesosphere/dcos-commons.git","clone_url":"https://github.com/mesosphere/dcos-commons.git","svn_url":"https://github.com/mesosphere/dcos-commons","homepage":"https://mesosphere.github.io/dcos-commons/","size":51130,"stargazers_count":85,"watchers_count":85,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":80,"mirror_url":null,"open_issues_count":68,"forks":80,"open_issues":68,"watchers":85,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/1411"},"html":{"href":"https://github.com/mesosphere/dcos-commons/pull/1411"},"issue":{"href":"https://api.github.com/repos/mesosphere/dcos-commons/issues/1411"},"comments":{"href":"https://api.github.com/repos/mesosphere/dcos-commons/issues/1411/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/1411/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/dcos-commons/pulls/1411/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/dcos-commons/statuses/8ab60575ef93a07ac3776185f7201c26fd933a26"}}}}
{"actor":{"display_login":"benclarkwood"}}