{"action":"created","comment":{"url":"https://api.github.com/repos/clearlinux/autospec/pulls/comments/335683112","pull_request_review_id":302843221,"id":335683112,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzNTY4MzExMg==","diff_hunk":"@@ -424,6 +424,38 @@ def mock_util_call(cmd):\n         # one for each file added\n         self.assertEqual(build.must_restart, 3)\n \n+    def test_parse_build_results_banned_files(self):\n+        \"\"\"\n+        Test parse_build_results with a test log indicating banned files are missing\n+        \"\"\"\n+        def mock_util_call(cmd):\n+            del cmd\n+\n+        build.config.setup_patterns()\n+        call_backup = build.util.call\n+        build.util.call = mock_util_call\n+        fm = files.FileManager()\n+\n+        open_name = 'build.util.open_auto'\n+        content = 'line 1\\n' \\\n+                  'Installed (but unpackaged) file(s) found:\\n' \\\n+                  '/opt/file\\n' \\\n+                  '/usr/etc/file\\n' \\\n+                  '/usr/local/file\\n' \\\n+                  '/usr/src/file\\n' \\\n+                  'RPM build errors\\n' \\\n+                  'errors here\\n'\n+        m_open = mock_open(read_data=content)\n+\n+        with patch(open_name, m_open, create=True):\n+            build.parse_build_results('testname', 0, fm)\n+\n+        build.util.call = call_backup\n+\n+        self.assertEqual(fm.has_banned, True)\n+        # one for each file added","path":"tests/test_build.py","position":null,"original_position":33,"commit_id":"def9aaa5887913f368892e7637cb8ea0c5870618","original_commit_id":"98445f9992410a572e34fe4bbc318d2a64b01a37","user":{"login":"phmccarty","id":1093718,"node_id":"MDQ6VXNlcjEwOTM3MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1093718?v=4","gravatar_id":"","url":"https://api.github.com/users/phmccarty","html_url":"https://github.com/phmccarty","followers_url":"https://api.github.com/users/phmccarty/followers","following_url":"https://api.github.com/users/phmccarty/following{/other_user}","gists_url":"https://api.github.com/users/phmccarty/gists{/gist_id}","starred_url":"https://api.github.com/users/phmccarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phmccarty/subscriptions","organizations_url":"https://api.github.com/users/phmccarty/orgs","repos_url":"https://api.github.com/users/phmccarty/repos","events_url":"https://api.github.com/users/phmccarty/events{/privacy}","received_events_url":"https://api.github.com/users/phmccarty/received_events","type":"User","site_admin":false},"body":"yeah, that sounds fine","created_at":"2019-10-16T20:06:40Z","updated_at":"2019-10-16T20:06:40Z","html_url":"https://github.com/clearlinux/autospec/pull/503#discussion_r335683112","pull_request_url":"https://api.github.com/repos/clearlinux/autospec/pulls/503","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/clearlinux/autospec/pulls/comments/335683112"},"html":{"href":"https://github.com/clearlinux/autospec/pull/503#discussion_r335683112"},"pull_request":{"href":"https://api.github.com/repos/clearlinux/autospec/pulls/503"}},"in_reply_to_id":335654604},"pull_request":{"url":"https://api.github.com/repos/clearlinux/autospec/pulls/503","id":328898521,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI4ODk4NTIx","html_url":"https://github.com/clearlinux/autospec/pull/503","diff_url":"https://github.com/clearlinux/autospec/pull/503.diff","patch_url":"https://github.com/clearlinux/autospec/pull/503.patch","issue_url":"https://api.github.com/repos/clearlinux/autospec/issues/503","number":503,"state":"open","locked":false,"title":"Add tests for banned paths","user":{"login":"bryteise","id":15709,"node_id":"MDQ6VXNlcjE1NzA5","avatar_url":"https://avatars2.githubusercontent.com/u/15709?v=4","gravatar_id":"","url":"https://api.github.com/users/bryteise","html_url":"https://github.com/bryteise","followers_url":"https://api.github.com/users/bryteise/followers","following_url":"https://api.github.com/users/bryteise/following{/other_user}","gists_url":"https://api.github.com/users/bryteise/gists{/gist_id}","starred_url":"https://api.github.com/users/bryteise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryteise/subscriptions","organizations_url":"https://api.github.com/users/bryteise/orgs","repos_url":"https://api.github.com/users/bryteise/repos","events_url":"https://api.github.com/users/bryteise/events{/privacy}","received_events_url":"https://api.github.com/users/bryteise/received_events","type":"User","site_admin":false},"body":"Autospec currently doesn't handle /etc/, /opt/, /usr/etc/, /usr/local/\r\nor /usr/src/ content paths so explicity warn and then fail when\r\ncontent in these paths are detected.","created_at":"2019-10-16T18:33:26Z","updated_at":"2019-10-16T20:06:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d32043ad326bbf0f9c80d439d5570c9f53b410d7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/clearlinux/autospec/pulls/503/commits","review_comments_url":"https://api.github.com/repos/clearlinux/autospec/pulls/503/comments","review_comment_url":"https://api.github.com/repos/clearlinux/autospec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clearlinux/autospec/issues/503/comments","statuses_url":"https://api.github.com/repos/clearlinux/autospec/statuses/def9aaa5887913f368892e7637cb8ea0c5870618","head":{"label":"clearlinux:add-banned-content-checks","ref":"add-banned-content-checks","sha":"def9aaa5887913f368892e7637cb8ea0c5870618","user":{"login":"clearlinux","id":12545216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTQ1MjE2","avatar_url":"https://avatars2.githubusercontent.com/u/12545216?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlinux","html_url":"https://github.com/clearlinux","followers_url":"https://api.github.com/users/clearlinux/followers","following_url":"https://api.github.com/users/clearlinux/following{/other_user}","gists_url":"https://api.github.com/users/clearlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlinux/subscriptions","organizations_url":"https://api.github.com/users/clearlinux/orgs","repos_url":"https://api.github.com/users/clearlinux/repos","events_url":"https://api.github.com/users/clearlinux/events{/privacy}","received_events_url":"https://api.github.com/users/clearlinux/received_events","type":"Organization","site_admin":false},"repo":{"id":45694952,"node_id":"MDEwOlJlcG9zaXRvcnk0NTY5NDk1Mg==","name":"autospec","full_name":"clearlinux/autospec","private":false,"owner":{"login":"clearlinux","id":12545216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTQ1MjE2","avatar_url":"https://avatars2.githubusercontent.com/u/12545216?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlinux","html_url":"https://github.com/clearlinux","followers_url":"https://api.github.com/users/clearlinux/followers","following_url":"https://api.github.com/users/clearlinux/following{/other_user}","gists_url":"https://api.github.com/users/clearlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlinux/subscriptions","organizations_url":"https://api.github.com/users/clearlinux/orgs","repos_url":"https://api.github.com/users/clearlinux/repos","events_url":"https://api.github.com/users/clearlinux/events{/privacy}","received_events_url":"https://api.github.com/users/clearlinux/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/clearlinux/autospec","description":"RPM packaging automation tool","fork":false,"url":"https://api.github.com/repos/clearlinux/autospec","forks_url":"https://api.github.com/repos/clearlinux/autospec/forks","keys_url":"https://api.github.com/repos/clearlinux/autospec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clearlinux/autospec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clearlinux/autospec/teams","hooks_url":"https://api.github.com/repos/clearlinux/autospec/hooks","issue_events_url":"https://api.github.com/repos/clearlinux/autospec/issues/events{/number}","events_url":"https://api.github.com/repos/clearlinux/autospec/events","assignees_url":"https://api.github.com/repos/clearlinux/autospec/assignees{/user}","branches_url":"https://api.github.com/repos/clearlinux/autospec/branches{/branch}","tags_url":"https://api.github.com/repos/clearlinux/autospec/tags","blobs_url":"https://api.github.com/repos/clearlinux/autospec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clearlinux/autospec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clearlinux/autospec/git/refs{/sha}","trees_url":"https://api.github.com/repos/clearlinux/autospec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clearlinux/autospec/statuses/{sha}","languages_url":"https://api.github.com/repos/clearlinux/autospec/languages","stargazers_url":"https://api.github.com/repos/clearlinux/autospec/stargazers","contributors_url":"https://api.github.com/repos/clearlinux/autospec/contributors","subscribers_url":"https://api.github.com/repos/clearlinux/autospec/subscribers","subscription_url":"https://api.github.com/repos/clearlinux/autospec/subscription","commits_url":"https://api.github.com/repos/clearlinux/autospec/commits{/sha}","git_commits_url":"https://api.github.com/repos/clearlinux/autospec/git/commits{/sha}","comments_url":"https://api.github.com/repos/clearlinux/autospec/comments{/number}","issue_comment_url":"https://api.github.com/repos/clearlinux/autospec/issues/comments{/number}","contents_url":"https://api.github.com/repos/clearlinux/autospec/contents/{+path}","compare_url":"https://api.github.com/repos/clearlinux/autospec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clearlinux/autospec/merges","archive_url":"https://api.github.com/repos/clearlinux/autospec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clearlinux/autospec/downloads","issues_url":"https://api.github.com/repos/clearlinux/autospec/issues{/number}","pulls_url":"https://api.github.com/repos/clearlinux/autospec/pulls{/number}","milestones_url":"https://api.github.com/repos/clearlinux/autospec/milestones{/number}","notifications_url":"https://api.github.com/repos/clearlinux/autospec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clearlinux/autospec/labels{/name}","releases_url":"https://api.github.com/repos/clearlinux/autospec/releases{/id}","deployments_url":"https://api.github.com/repos/clearlinux/autospec/deployments","created_at":"2015-11-06T16:58:26Z","updated_at":"2019-10-16T14:43:26Z","pushed_at":"2019-10-16T20:04:35Z","git_url":"git://github.com/clearlinux/autospec.git","ssh_url":"git@github.com:clearlinux/autospec.git","clone_url":"https://github.com/clearlinux/autospec.git","svn_url":"https://github.com/clearlinux/autospec","homepage":"","size":18892,"stargazers_count":64,"watchers_count":64,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":46,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":45,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":46,"open_issues":45,"watchers":64,"default_branch":"master"}},"base":{"label":"clearlinux:master","ref":"master","sha":"16b225cdd7c3ba7b03def184994bfedb13d5892b","user":{"login":"clearlinux","id":12545216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTQ1MjE2","avatar_url":"https://avatars2.githubusercontent.com/u/12545216?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlinux","html_url":"https://github.com/clearlinux","followers_url":"https://api.github.com/users/clearlinux/followers","following_url":"https://api.github.com/users/clearlinux/following{/other_user}","gists_url":"https://api.github.com/users/clearlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlinux/subscriptions","organizations_url":"https://api.github.com/users/clearlinux/orgs","repos_url":"https://api.github.com/users/clearlinux/repos","events_url":"https://api.github.com/users/clearlinux/events{/privacy}","received_events_url":"https://api.github.com/users/clearlinux/received_events","type":"Organization","site_admin":false},"repo":{"id":45694952,"node_id":"MDEwOlJlcG9zaXRvcnk0NTY5NDk1Mg==","name":"autospec","full_name":"clearlinux/autospec","private":false,"owner":{"login":"clearlinux","id":12545216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTQ1MjE2","avatar_url":"https://avatars2.githubusercontent.com/u/12545216?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlinux","html_url":"https://github.com/clearlinux","followers_url":"https://api.github.com/users/clearlinux/followers","following_url":"https://api.github.com/users/clearlinux/following{/other_user}","gists_url":"https://api.github.com/users/clearlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlinux/subscriptions","organizations_url":"https://api.github.com/users/clearlinux/orgs","repos_url":"https://api.github.com/users/clearlinux/repos","events_url":"https://api.github.com/users/clearlinux/events{/privacy}","received_events_url":"https://api.github.com/users/clearlinux/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/clearlinux/autospec","description":"RPM packaging automation tool","fork":false,"url":"https://api.github.com/repos/clearlinux/autospec","forks_url":"https://api.github.com/repos/clearlinux/autospec/forks","keys_url":"https://api.github.com/repos/clearlinux/autospec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clearlinux/autospec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clearlinux/autospec/teams","hooks_url":"https://api.github.com/repos/clearlinux/autospec/hooks","issue_events_url":"https://api.github.com/repos/clearlinux/autospec/issues/events{/number}","events_url":"https://api.github.com/repos/clearlinux/autospec/events","assignees_url":"https://api.github.com/repos/clearlinux/autospec/assignees{/user}","branches_url":"https://api.github.com/repos/clearlinux/autospec/branches{/branch}","tags_url":"https://api.github.com/repos/clearlinux/autospec/tags","blobs_url":"https://api.github.com/repos/clearlinux/autospec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clearlinux/autospec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clearlinux/autospec/git/refs{/sha}","trees_url":"https://api.github.com/repos/clearlinux/autospec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clearlinux/autospec/statuses/{sha}","languages_url":"https://api.github.com/repos/clearlinux/autospec/languages","stargazers_url":"https://api.github.com/repos/clearlinux/autospec/stargazers","contributors_url":"https://api.github.com/repos/clearlinux/autospec/contributors","subscribers_url":"https://api.github.com/repos/clearlinux/autospec/subscribers","subscription_url":"https://api.github.com/repos/clearlinux/autospec/subscription","commits_url":"https://api.github.com/repos/clearlinux/autospec/commits{/sha}","git_commits_url":"https://api.github.com/repos/clearlinux/autospec/git/commits{/sha}","comments_url":"https://api.github.com/repos/clearlinux/autospec/comments{/number}","issue_comment_url":"https://api.github.com/repos/clearlinux/autospec/issues/comments{/number}","contents_url":"https://api.github.com/repos/clearlinux/autospec/contents/{+path}","compare_url":"https://api.github.com/repos/clearlinux/autospec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clearlinux/autospec/merges","archive_url":"https://api.github.com/repos/clearlinux/autospec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clearlinux/autospec/downloads","issues_url":"https://api.github.com/repos/clearlinux/autospec/issues{/number}","pulls_url":"https://api.github.com/repos/clearlinux/autospec/pulls{/number}","milestones_url":"https://api.github.com/repos/clearlinux/autospec/milestones{/number}","notifications_url":"https://api.github.com/repos/clearlinux/autospec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clearlinux/autospec/labels{/name}","releases_url":"https://api.github.com/repos/clearlinux/autospec/releases{/id}","deployments_url":"https://api.github.com/repos/clearlinux/autospec/deployments","created_at":"2015-11-06T16:58:26Z","updated_at":"2019-10-16T14:43:26Z","pushed_at":"2019-10-16T20:04:35Z","git_url":"git://github.com/clearlinux/autospec.git","ssh_url":"git@github.com:clearlinux/autospec.git","clone_url":"https://github.com/clearlinux/autospec.git","svn_url":"https://github.com/clearlinux/autospec","homepage":"","size":18892,"stargazers_count":64,"watchers_count":64,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":46,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":45,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":46,"open_issues":45,"watchers":64,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clearlinux/autospec/pulls/503"},"html":{"href":"https://github.com/clearlinux/autospec/pull/503"},"issue":{"href":"https://api.github.com/repos/clearlinux/autospec/issues/503"},"comments":{"href":"https://api.github.com/repos/clearlinux/autospec/issues/503/comments"},"review_comments":{"href":"https://api.github.com/repos/clearlinux/autospec/pulls/503/comments"},"review_comment":{"href":"https://api.github.com/repos/clearlinux/autospec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clearlinux/autospec/pulls/503/commits"},"statuses":{"href":"https://api.github.com/repos/clearlinux/autospec/statuses/def9aaa5887913f368892e7637cb8ea0c5870618"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"phmccarty"}}