{"action":"created","comment":{"url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/comments/221510567","pull_request_review_id":160170461,"id":221510567,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTUxMDU2Nw==","diff_hunk":"@@ -0,0 +1,212 @@\n+package tests_test\n+\n+import (\n+\t\"flag\"\n+\t\"fmt\"\n+\t\"io\"\n+\t\"strings\"\n+\t\"time\"\n+\t. \"github.com/onsi/ginkgo\"\n+\t. \"github.com/onsi/ginkgo/extensions/table\"\n+\t. \"github.com/onsi/gomega\"\n+\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n+\tktests \"kubevirt.io/kubevirt-ansible/tests\"\n+\t\"kubevirt.io/kubevirt/pkg/kubecli\"\n+\t\"kubevirt.io/kubevirt/pkg/log\"\n+\t\"kubevirt.io/kubevirt/tests\"\n+)\n+\n+var _ = Describe(\"RBAC\", func() {\n+\tflag.Parse()\n+\n+\tvar vmi ktests.VMManifest\n+\n+\tvirtClient, err := kubecli.GetKubevirtClient()\n+\ttests.PanicOnError(err)\n+\n+\tBeforeEach(func() {\n+\t\tBy(\"Login with the user test_admin\")\n+\t\targs := []string{\"login\", \"-u\", \"test_admin\", \"-p\", \"123456\"}\n+\t\t_, err := tests.RunCommand(\"oc\", args...)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\n+\t\ttests.BeforeTestCleanup()\n+\t\tvmi.Name = \"vm-cirros\"\n+\t\tvmi.Manifest = \"tests/manifests/vm-cirros.yaml\"\n+\t\tktests.CreateUser()\n+\n+\t\tBy(\"Create a VM with yaml\")\n+\t\targs = []string{\"create\", \"-f\", vmi.Manifest, \"-n\", tests.NamespaceTestAlternative}\n+\t\t_, err = tests.RunCommand(\"oc\", args...)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\n+\t\tBy(\"Check VMI should create\")\n+\t\targs = []string{\"start\", vmi.Name, \"-n\", tests.NamespaceTestAlternative}\n+\t\t_, err = tests.RunCommand(\"virtctl\", args...)\n+\t\tExpect(err).ToNot(HaveOccurred())\n+\n+\t\tBy(\"Check the vmi is running\")\n+\t\targs = []string{\"get\", \"vmi\", vmi.Name, \"--template\", \"{{.status.phase}}\", \"-n\", tests.NamespaceTestAlternative}\n+\t\tEventually(func() string {\n+\t\t\toutput, err := tests.RunCommand(\"oc\", args...)\n+\t\t\tExpect(err).ToNot(HaveOccurred())\n+\t\t\treturn output\n+\t\t}, time.Minute*10).Should(Equal(\"Running\"))\n+\t})\n+\n+\tAfterEach(func() {\n+\t\tBy(\"Login with the user test_admin\")\n+\t\targs := []string{\"login\", \"-u\", \"test_admin\", \"-p\", \"123456\"}","path":"tests/rbac_test.go","position":59,"original_position":59,"commit_id":"9990689098bdd257a165af19cdc2b0d7bdbf93fa","original_commit_id":"9990689098bdd257a165af19cdc2b0d7bdbf93fa","user":{"login":"vatsalparekh","id":6758282,"node_id":"MDQ6VXNlcjY3NTgyODI=","avatar_url":"https://avatars3.githubusercontent.com/u/6758282?v=4","gravatar_id":"","url":"https://api.github.com/users/vatsalparekh","html_url":"https://github.com/vatsalparekh","followers_url":"https://api.github.com/users/vatsalparekh/followers","following_url":"https://api.github.com/users/vatsalparekh/following{/other_user}","gists_url":"https://api.github.com/users/vatsalparekh/gists{/gist_id}","starred_url":"https://api.github.com/users/vatsalparekh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatsalparekh/subscriptions","organizations_url":"https://api.github.com/users/vatsalparekh/orgs","repos_url":"https://api.github.com/users/vatsalparekh/repos","events_url":"https://api.github.com/users/vatsalparekh/events{/privacy}","received_events_url":"https://api.github.com/users/vatsalparekh/received_events","type":"User","site_admin":false},"body":"same here for cluster related variables","created_at":"2018-10-01T07:11:40Z","updated_at":"2018-10-01T07:47:40Z","html_url":"https://github.com/kubevirt/kubevirt-ansible/pull/388#discussion_r221510567","pull_request_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/388","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/comments/221510567"},"html":{"href":"https://github.com/kubevirt/kubevirt-ansible/pull/388#discussion_r221510567"},"pull_request":{"href":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/388"}}},"pull_request":{"url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/388","id":215883440,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1ODgzNDQw","html_url":"https://github.com/kubevirt/kubevirt-ansible/pull/388","diff_url":"https://github.com/kubevirt/kubevirt-ansible/pull/388.diff","patch_url":"https://github.com/kubevirt/kubevirt-ansible/pull/388.patch","issue_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/issues/388","number":388,"state":"open","locked":false,"title":"[RFR] RBAC testing.","user":{"login":"adityaramteke","id":25552844,"node_id":"MDQ6VXNlcjI1NTUyODQ0","avatar_url":"https://avatars2.githubusercontent.com/u/25552844?v=4","gravatar_id":"","url":"https://api.github.com/users/adityaramteke","html_url":"https://github.com/adityaramteke","followers_url":"https://api.github.com/users/adityaramteke/followers","following_url":"https://api.github.com/users/adityaramteke/following{/other_user}","gists_url":"https://api.github.com/users/adityaramteke/gists{/gist_id}","starred_url":"https://api.github.com/users/adityaramteke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adityaramteke/subscriptions","organizations_url":"https://api.github.com/users/adityaramteke/orgs","repos_url":"https://api.github.com/users/adityaramteke/repos","events_url":"https://api.github.com/users/adityaramteke/events{/privacy}","received_events_url":"https://api.github.com/users/adityaramteke/received_events","type":"User","site_admin":false},"body":"RBAC Authorization tests for subresource API with:\r\n           Default Admin role.\r\n           Default Edit role.\r\n           Default View role.\r\nhttps://trello.com/c/MQjYEozE/121-epic-authorization-install-openshift-policies-for-kubevirt-api","created_at":"2018-09-17T06:31:42Z","updated_at":"2018-10-01T07:47:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90fea3d9696d5e55ad7f8a5f8d505637c7e04572","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/388/commits","review_comments_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/388/comments","review_comment_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/issues/388/comments","statuses_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/statuses/9990689098bdd257a165af19cdc2b0d7bdbf93fa","head":{"label":"adityaramteke:rbac_test_auto","ref":"rbac_test_auto","sha":"9990689098bdd257a165af19cdc2b0d7bdbf93fa","user":{"login":"adityaramteke","id":25552844,"node_id":"MDQ6VXNlcjI1NTUyODQ0","avatar_url":"https://avatars2.githubusercontent.com/u/25552844?v=4","gravatar_id":"","url":"https://api.github.com/users/adityaramteke","html_url":"https://github.com/adityaramteke","followers_url":"https://api.github.com/users/adityaramteke/followers","following_url":"https://api.github.com/users/adityaramteke/following{/other_user}","gists_url":"https://api.github.com/users/adityaramteke/gists{/gist_id}","starred_url":"https://api.github.com/users/adityaramteke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adityaramteke/subscriptions","organizations_url":"https://api.github.com/users/adityaramteke/orgs","repos_url":"https://api.github.com/users/adityaramteke/repos","events_url":"https://api.github.com/users/adityaramteke/events{/privacy}","received_events_url":"https://api.github.com/users/adityaramteke/received_events","type":"User","site_admin":false},"repo":{"id":146430436,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY0MzA0MzY=","name":"kubevirt-ansible","full_name":"adityaramteke/kubevirt-ansible","private":false,"owner":{"login":"adityaramteke","id":25552844,"node_id":"MDQ6VXNlcjI1NTUyODQ0","avatar_url":"https://avatars2.githubusercontent.com/u/25552844?v=4","gravatar_id":"","url":"https://api.github.com/users/adityaramteke","html_url":"https://github.com/adityaramteke","followers_url":"https://api.github.com/users/adityaramteke/followers","following_url":"https://api.github.com/users/adityaramteke/following{/other_user}","gists_url":"https://api.github.com/users/adityaramteke/gists{/gist_id}","starred_url":"https://api.github.com/users/adityaramteke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adityaramteke/subscriptions","organizations_url":"https://api.github.com/users/adityaramteke/orgs","repos_url":"https://api.github.com/users/adityaramteke/repos","events_url":"https://api.github.com/users/adityaramteke/events{/privacy}","received_events_url":"https://api.github.com/users/adityaramteke/received_events","type":"User","site_admin":false},"html_url":"https://github.com/adityaramteke/kubevirt-ansible","description":"Set of Ansible roles & playbooks for KubeVirt deployment","fork":true,"url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible","forks_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/forks","keys_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/teams","hooks_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/hooks","issue_events_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/issues/events{/number}","events_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/events","assignees_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/assignees{/user}","branches_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/branches{/branch}","tags_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/tags","blobs_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/languages","stargazers_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/stargazers","contributors_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/contributors","subscribers_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/subscribers","subscription_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/subscription","commits_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/contents/{+path}","compare_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/merges","archive_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/downloads","issues_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/issues{/number}","pulls_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/labels{/name}","releases_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/releases{/id}","deployments_url":"https://api.github.com/repos/adityaramteke/kubevirt-ansible/deployments","created_at":"2018-08-28T10:24:27Z","updated_at":"2018-08-28T10:24:29Z","pushed_at":"2018-09-28T13:31:08Z","git_url":"git://github.com/adityaramteke/kubevirt-ansible.git","ssh_url":"git@github.com:adityaramteke/kubevirt-ansible.git","clone_url":"https://github.com/adityaramteke/kubevirt-ansible.git","svn_url":"https://github.com/adityaramteke/kubevirt-ansible","homepage":"","size":18970,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubevirt:master","ref":"master","sha":"cfe0d70c6bd903a4dba2ebde953f425b586b8d9c","user":{"login":"kubevirt","id":18700703,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NzAwNzAz","avatar_url":"https://avatars1.githubusercontent.com/u/18700703?v=4","gravatar_id":"","url":"https://api.github.com/users/kubevirt","html_url":"https://github.com/kubevirt","followers_url":"https://api.github.com/users/kubevirt/followers","following_url":"https://api.github.com/users/kubevirt/following{/other_user}","gists_url":"https://api.github.com/users/kubevirt/gists{/gist_id}","starred_url":"https://api.github.com/users/kubevirt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubevirt/subscriptions","organizations_url":"https://api.github.com/users/kubevirt/orgs","repos_url":"https://api.github.com/users/kubevirt/repos","events_url":"https://api.github.com/users/kubevirt/events{/privacy}","received_events_url":"https://api.github.com/users/kubevirt/received_events","type":"Organization","site_admin":false},"repo":{"id":103531813,"node_id":"MDEwOlJlcG9zaXRvcnkxMDM1MzE4MTM=","name":"kubevirt-ansible","full_name":"kubevirt/kubevirt-ansible","private":false,"owner":{"login":"kubevirt","id":18700703,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NzAwNzAz","avatar_url":"https://avatars1.githubusercontent.com/u/18700703?v=4","gravatar_id":"","url":"https://api.github.com/users/kubevirt","html_url":"https://github.com/kubevirt","followers_url":"https://api.github.com/users/kubevirt/followers","following_url":"https://api.github.com/users/kubevirt/following{/other_user}","gists_url":"https://api.github.com/users/kubevirt/gists{/gist_id}","starred_url":"https://api.github.com/users/kubevirt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubevirt/subscriptions","organizations_url":"https://api.github.com/users/kubevirt/orgs","repos_url":"https://api.github.com/users/kubevirt/repos","events_url":"https://api.github.com/users/kubevirt/events{/privacy}","received_events_url":"https://api.github.com/users/kubevirt/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kubevirt/kubevirt-ansible","description":"Set of Ansible roles & playbooks for KubeVirt deployment","fork":false,"url":"https://api.github.com/repos/kubevirt/kubevirt-ansible","forks_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/forks","keys_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/teams","hooks_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/hooks","issue_events_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/issues/events{/number}","events_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/events","assignees_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/assignees{/user}","branches_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/branches{/branch}","tags_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/tags","blobs_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/languages","stargazers_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/stargazers","contributors_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/contributors","subscribers_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/subscribers","subscription_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/subscription","commits_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/contents/{+path}","compare_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/merges","archive_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/downloads","issues_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/issues{/number}","pulls_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/labels{/name}","releases_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/releases{/id}","deployments_url":"https://api.github.com/repos/kubevirt/kubevirt-ansible/deployments","created_at":"2017-09-14T12:52:28Z","updated_at":"2018-09-26T11:36:15Z","pushed_at":"2018-09-30T17:50:54Z","git_url":"git://github.com/kubevirt/kubevirt-ansible.git","ssh_url":"git@github.com:kubevirt/kubevirt-ansible.git","clone_url":"https://github.com/kubevirt/kubevirt-ansible.git","svn_url":"https://github.com/kubevirt/kubevirt-ansible","homepage":"","size":18962,"stargazers_count":33,"watchers_count":33,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":44,"open_issues":46,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/388"},"html":{"href":"https://github.com/kubevirt/kubevirt-ansible/pull/388"},"issue":{"href":"https://api.github.com/repos/kubevirt/kubevirt-ansible/issues/388"},"comments":{"href":"https://api.github.com/repos/kubevirt/kubevirt-ansible/issues/388/comments"},"review_comments":{"href":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/388/comments"},"review_comment":{"href":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubevirt/kubevirt-ansible/pulls/388/commits"},"statuses":{"href":"https://api.github.com/repos/kubevirt/kubevirt-ansible/statuses/9990689098bdd257a165af19cdc2b0d7bdbf93fa"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"vatsalparekh"}}