{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/comments/118470045","pull_request_review_id":40264378,"id":118470045,"diff_hunk":"@@ -0,0 +1,149 @@\n+# -*- coding: utf-8 -*-\n+# These tests don't work at the moment, due to the security_groups multi select not working\n+# in selenium (the group is selected then immediately reset)\n+import pytest\n+\n+import cfme.fixtures.pytest_selenium as sel\n+from cfme.cloud.provider import CloudProvider\n+from cfme.web_ui import flash, form_buttons\n+from utils import testgen, error\n+from utils.conf import cfme_data\n+from utils.conf import credentials\n+from utils.log import logger\n+from utils.appliance.implementations.ui import navigate_to\n+\n+pytestmark = [pytest.mark.tier(1)]\n+pytest_generate_tests = testgen.generate([CloudProvider], scope=\"module\")\n+\n+\n+@pytest.mark.uncollectif(lambda provider: provider.type == 'openstack')\n+def test_proxy_default(appliance, provider, setup_provider, request):\n+    \"\"\"Configures the default proxy for all providers\"\"\"\n+    logger.info(\"Begin Test Valid Default Proxy for Provider {}\".format(provider.type))\n+\n+    @request.addfinalizer\n+    def _cleanup_proxy():\n+        reset_proxy(appliance, ['default'], provider)\n+\n+    logger.info(\"Test to fail first\")\n+    settings_local(appliance, [\"default\"], False)\n+    restart_appliance(appliance)\n+    with error.expected('Credential validation was not successful:'):\n+        validate_provider(appliance, provider)\n+        flash.assert_message_match('Credential validation was successful')\n+\n+    logger.info(\"Then test to pass\")\n+    settings_local(appliance, ['default'], True)\n+    restart_appliance(appliance)\n+    validate_provider(appliance, provider)\n+    flash.assert_message_match('Credential validation was successful')\n+\n+\n+@pytest.mark.uncollectif(lambda provider: provider.type == 'openstack')\n+def test_proxy_valid(appliance, provider, setup_provider, request):\n+    \"\"\"Configures the specific valid proxy for each provider\"\"\"\n+    logger.info(\"Begin Test Valid Proxy for Provider {}\".format(provider.type))\n+\n+    @request.addfinalizer\n+    def _cleanup_proxy():\n+        reset_proxy(appliance, [provider.type], provider)\n+\n+    settings_local(appliance, [provider.type], True)\n+    validate_provider(appliance, provider)\n+    flash.assert_message_match('Credential validation was successful')\n+\n+\n+@pytest.mark.uncollectif(lambda provider: provider.type == 'openstack')\n+def test_proxy_invalid(appliance, provider, setup_provider, request):\n+    \"\"\"Configures the specific invalid proxy for each provider\"\"\"\n+    logger.info(\"Begin Test Invalid Proxy for Provider {}\".format(provider.type))\n+\n+    @request.addfinalizer\n+    def _cleanup_proxy():\n+        reset_proxy(appliance, [provider.type], provider)\n+\n+    settings_local(appliance, [provider.type], False)\n+    restart_appliance(appliance)\n+    with error.expected('Credential validation was not successful:'):\n+        validate_provider(appliance, provider)\n+        flash.assert_message_match('Credential validation was successful')\n+\n+\n+@pytest.mark.uncollectif(lambda provider: provider.type == 'openstack')\n+def test_proxy_remove(appliance, provider, setup_provider, request):\n+    \"\"\"Removes the specific valid proxy for all providers\"\"\"\n+    logger.info(\"Begin Test to Remove Proxy\")\n+\n+    @request.addfinalizer\n+    def _cleanup_proxy():\n+        reset_proxy(appliance, [provider.type], provider)\n+\n+    appliance.ssh_client.run_command(\n+        \"rm -f /var/www/miq/vmdb/config/settings.local.yml\")\n+    restart_appliance(appliance)\n+    validate_provider(appliance, provider)\n+    flash.assert_message_match('Credential validation was successful')\n+\n+\n+@pytest.mark.uncollectif(lambda provider: provider.type == 'openstack')\n+def test_proxy_override(appliance, provider, setup_provider, request):\n+    \"\"\"Configures a bad default and then a valid proxy for each provider\"\"\"\n+    logger.info(\"Begin Test Override Proxy for Provider {}\".format(provider.type))\n+\n+    @request.addfinalizer\n+    def _cleanup_proxy():\n+        reset_proxy(appliance, ['default', provider.type], provider)\n+\n+    logger.info(\"Test to fail first\")\n+    settings_local(appliance, [\"default\"], False)\n+    restart_appliance(appliance)\n+    with error.expected('Credential validation was not successful:'):\n+        validate_provider(appliance, provider)\n+        flash.assert_message_match('Credential validation was successful')\n+\n+    logger.info(\"Then test to pass using provider specific override\")\n+    settings_local(appliance, ['default', provider.type], True)\n+    restart_appliance(appliance)\n+    validate_provider(appliance, provider)\n+    flash.assert_message_match('Credential validation was successful')\n+\n+\n+def settings_local(appliance, proxy_type, valid=True):\n+    \"\"\"Creates the file string and sends it to the appliance\"\"\"\n+    proxy = cfme_data['proxy_servers']['default']\n+    creds = credentials[proxy['credentials']]\n+    port = proxy['port'] if valid else '8686'","path":"cfme/tests/cloud/test_cloud_proxy.py","position":117,"original_position":115,"commit_id":"e4fa5d55cf38a068b57e1bd0c474d3a09e15fc89","original_commit_id":"b98f51d934addc707732b22a402b6be5e86ff3f9","user":{"login":"mshriver","id":21315076,"avatar_url":"https://avatars0.githubusercontent.com/u/21315076?v=3","gravatar_id":"","url":"https://api.github.com/users/mshriver","html_url":"https://github.com/mshriver","followers_url":"https://api.github.com/users/mshriver/followers","following_url":"https://api.github.com/users/mshriver/following{/other_user}","gists_url":"https://api.github.com/users/mshriver/gists{/gist_id}","starred_url":"https://api.github.com/users/mshriver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshriver/subscriptions","organizations_url":"https://api.github.com/users/mshriver/orgs","repos_url":"https://api.github.com/users/mshriver/repos","events_url":"https://api.github.com/users/mshriver/events{/privacy}","received_events_url":"https://api.github.com/users/mshriver/received_events","type":"User","site_admin":false},"body":"I think you missed the point of the suggestion - I understood it was overloading port, I'm just suggesting that there's no need for two variables here. You can just use `port`, once, in the for loop at line 119, and stick this statement in the 'else' clause.","created_at":"2017-05-25T11:50:46Z","updated_at":"2017-05-25T11:50:46Z","html_url":"https://github.com/ManageIQ/integration_tests/pull/4669#discussion_r118470045","pull_request_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/4669","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/comments/118470045"},"html":{"href":"https://github.com/ManageIQ/integration_tests/pull/4669#discussion_r118470045"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/4669"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/4669","id":120185291,"html_url":"https://github.com/ManageIQ/integration_tests/pull/4669","diff_url":"https://github.com/ManageIQ/integration_tests/pull/4669.diff","patch_url":"https://github.com/ManageIQ/integration_tests/pull/4669.patch","issue_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues/4669","number":4669,"state":"open","locked":false,"title":"[RFR] RHCFQE-2052 Add Cloud Proxy automated tests","user":{"login":"jteehan","id":13650298,"avatar_url":"https://avatars1.githubusercontent.com/u/13650298?v=3","gravatar_id":"","url":"https://api.github.com/users/jteehan","html_url":"https://github.com/jteehan","followers_url":"https://api.github.com/users/jteehan/followers","following_url":"https://api.github.com/users/jteehan/following{/other_user}","gists_url":"https://api.github.com/users/jteehan/gists{/gist_id}","starred_url":"https://api.github.com/users/jteehan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jteehan/subscriptions","organizations_url":"https://api.github.com/users/jteehan/orgs","repos_url":"https://api.github.com/users/jteehan/repos","events_url":"https://api.github.com/users/jteehan/events{/privacy}","received_events_url":"https://api.github.com/users/jteehan/received_events","type":"User","site_admin":false},"body":"Purpose or Intent\r\n=================\r\n\r\nAdding tests for feature Cloud Proxy servers\r\n","created_at":"2017-05-11T19:40:45Z","updated_at":"2017-05-25T11:50:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca6684845474055f3991a5be8deea1c82d991658","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/4669/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/4669/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues/4669/comments","statuses_url":"https://api.github.com/repos/ManageIQ/integration_tests/statuses/e4fa5d55cf38a068b57e1bd0c474d3a09e15fc89","head":{"label":"jteehan:rhcfqe-2052","ref":"rhcfqe-2052","sha":"e4fa5d55cf38a068b57e1bd0c474d3a09e15fc89","user":{"login":"jteehan","id":13650298,"avatar_url":"https://avatars1.githubusercontent.com/u/13650298?v=3","gravatar_id":"","url":"https://api.github.com/users/jteehan","html_url":"https://github.com/jteehan","followers_url":"https://api.github.com/users/jteehan/followers","following_url":"https://api.github.com/users/jteehan/following{/other_user}","gists_url":"https://api.github.com/users/jteehan/gists{/gist_id}","starred_url":"https://api.github.com/users/jteehan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jteehan/subscriptions","organizations_url":"https://api.github.com/users/jteehan/orgs","repos_url":"https://api.github.com/users/jteehan/repos","events_url":"https://api.github.com/users/jteehan/events{/privacy}","received_events_url":"https://api.github.com/users/jteehan/received_events","type":"User","site_admin":false},"repo":{"id":40617124,"name":"cfme_tests","full_name":"jteehan/cfme_tests","owner":{"login":"jteehan","id":13650298,"avatar_url":"https://avatars1.githubusercontent.com/u/13650298?v=3","gravatar_id":"","url":"https://api.github.com/users/jteehan","html_url":"https://github.com/jteehan","followers_url":"https://api.github.com/users/jteehan/followers","following_url":"https://api.github.com/users/jteehan/following{/other_user}","gists_url":"https://api.github.com/users/jteehan/gists{/gist_id}","starred_url":"https://api.github.com/users/jteehan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jteehan/subscriptions","organizations_url":"https://api.github.com/users/jteehan/orgs","repos_url":"https://api.github.com/users/jteehan/repos","events_url":"https://api.github.com/users/jteehan/events{/privacy}","received_events_url":"https://api.github.com/users/jteehan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jteehan/cfme_tests","description":"CloudForms Management Engine - Functional tests","fork":true,"url":"https://api.github.com/repos/jteehan/cfme_tests","forks_url":"https://api.github.com/repos/jteehan/cfme_tests/forks","keys_url":"https://api.github.com/repos/jteehan/cfme_tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jteehan/cfme_tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jteehan/cfme_tests/teams","hooks_url":"https://api.github.com/repos/jteehan/cfme_tests/hooks","issue_events_url":"https://api.github.com/repos/jteehan/cfme_tests/issues/events{/number}","events_url":"https://api.github.com/repos/jteehan/cfme_tests/events","assignees_url":"https://api.github.com/repos/jteehan/cfme_tests/assignees{/user}","branches_url":"https://api.github.com/repos/jteehan/cfme_tests/branches{/branch}","tags_url":"https://api.github.com/repos/jteehan/cfme_tests/tags","blobs_url":"https://api.github.com/repos/jteehan/cfme_tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jteehan/cfme_tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jteehan/cfme_tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/jteehan/cfme_tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jteehan/cfme_tests/statuses/{sha}","languages_url":"https://api.github.com/repos/jteehan/cfme_tests/languages","stargazers_url":"https://api.github.com/repos/jteehan/cfme_tests/stargazers","contributors_url":"https://api.github.com/repos/jteehan/cfme_tests/contributors","subscribers_url":"https://api.github.com/repos/jteehan/cfme_tests/subscribers","subscription_url":"https://api.github.com/repos/jteehan/cfme_tests/subscription","commits_url":"https://api.github.com/repos/jteehan/cfme_tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/jteehan/cfme_tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/jteehan/cfme_tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/jteehan/cfme_tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/jteehan/cfme_tests/contents/{+path}","compare_url":"https://api.github.com/repos/jteehan/cfme_tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jteehan/cfme_tests/merges","archive_url":"https://api.github.com/repos/jteehan/cfme_tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jteehan/cfme_tests/downloads","issues_url":"https://api.github.com/repos/jteehan/cfme_tests/issues{/number}","pulls_url":"https://api.github.com/repos/jteehan/cfme_tests/pulls{/number}","milestones_url":"https://api.github.com/repos/jteehan/cfme_tests/milestones{/number}","notifications_url":"https://api.github.com/repos/jteehan/cfme_tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jteehan/cfme_tests/labels{/name}","releases_url":"https://api.github.com/repos/jteehan/cfme_tests/releases{/id}","deployments_url":"https://api.github.com/repos/jteehan/cfme_tests/deployments","created_at":"2015-08-12T18:23:35Z","updated_at":"2016-06-10T01:35:16Z","pushed_at":"2017-05-25T05:59:54Z","git_url":"git://github.com/jteehan/cfme_tests.git","ssh_url":"git@github.com:jteehan/cfme_tests.git","clone_url":"https://github.com/jteehan/cfme_tests.git","svn_url":"https://github.com/jteehan/cfme_tests","homepage":"","size":15044,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"adbcb737352a87049f540e4cedfdaaec2a09acdb","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars3.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":8061086,"name":"integration_tests","full_name":"ManageIQ/integration_tests","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars3.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/integration_tests","description":"ManageIQ integration tests","fork":false,"url":"https://api.github.com/repos/ManageIQ/integration_tests","forks_url":"https://api.github.com/repos/ManageIQ/integration_tests/forks","keys_url":"https://api.github.com/repos/ManageIQ/integration_tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/integration_tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/integration_tests/teams","hooks_url":"https://api.github.com/repos/ManageIQ/integration_tests/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/integration_tests/events","assignees_url":"https://api.github.com/repos/ManageIQ/integration_tests/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/integration_tests/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/integration_tests/tags","blobs_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/integration_tests/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/integration_tests/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/integration_tests/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/integration_tests/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/integration_tests/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/integration_tests/subscription","commits_url":"https://api.github.com/repos/ManageIQ/integration_tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/integration_tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/integration_tests/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/integration_tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/integration_tests/merges","archive_url":"https://api.github.com/repos/ManageIQ/integration_tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/integration_tests/downloads","issues_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/integration_tests/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/integration_tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/integration_tests/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/integration_tests/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/integration_tests/deployments","created_at":"2013-02-06T21:59:17Z","updated_at":"2017-05-04T19:09:07Z","pushed_at":"2017-05-25T11:35:21Z","git_url":"git://github.com/ManageIQ/integration_tests.git","ssh_url":"git@github.com:ManageIQ/integration_tests.git","clone_url":"https://github.com/ManageIQ/integration_tests.git","svn_url":"https://github.com/ManageIQ/integration_tests","homepage":"","size":15228,"stargazers_count":38,"watchers_count":38,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":83,"mirror_url":null,"open_issues_count":116,"forks":83,"open_issues":116,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/4669"},"html":{"href":"https://github.com/ManageIQ/integration_tests/pull/4669"},"issue":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/issues/4669"},"comments":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/issues/4669/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/4669/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/4669/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/statuses/e4fa5d55cf38a068b57e1bd0c474d3a09e15fc89"}}}}
{"actor":{"display_login":"mshriver"}}