{"action":"created","issue":{"url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/975","repository_url":"https://api.github.com/repos/PulpQE/pulp-smash","labels_url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/975/labels{/name}","comments_url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/975/comments","events_url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/975/events","html_url":"https://github.com/PulpQE/pulp-smash/pull/975","id":317658564,"number":975,"title":"SELinux tests need to be a toggle for some test environments","user":{"login":"dekimsey","id":90741,"avatar_url":"https://avatars1.githubusercontent.com/u/90741?v=4","gravatar_id":"","url":"https://api.github.com/users/dekimsey","html_url":"https://github.com/dekimsey","followers_url":"https://api.github.com/users/dekimsey/followers","following_url":"https://api.github.com/users/dekimsey/following{/other_user}","gists_url":"https://api.github.com/users/dekimsey/gists{/gist_id}","starred_url":"https://api.github.com/users/dekimsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dekimsey/subscriptions","organizations_url":"https://api.github.com/users/dekimsey/orgs","repos_url":"https://api.github.com/users/dekimsey/repos","events_url":"https://api.github.com/users/dekimsey/events{/privacy}","received_events_url":"https://api.github.com/users/dekimsey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2018-04-25T14:39:45Z","updated_at":"2018-05-02T20:31:40Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/PulpQE/pulp-smash/pulls/975","html_url":"https://github.com/PulpQE/pulp-smash/pull/975","diff_url":"https://github.com/PulpQE/pulp-smash/pull/975.diff","patch_url":"https://github.com/PulpQE/pulp-smash/pull/975.patch"},"body":"The selinux tests currently require the vm/container to be running selinux. This causes an issue on test environments such as OX + Containers.\r\n\r\nSo we now provide a `settings.json` to be able to let the user/provisoner toggle this setting off. The default behavior will of course be to require (and expect) selinux tests to pass.\r\n\r\n\r\n#### before\r\n```\r\n(pulp-smash) [vagrant@pulp2 pulp-smash]$ py.test pulp_smash/tests/pulp2/platform/cli/test_selinux.py -xv\r\n================================================================== test session starts ===================================================================\r\nplatform linux -- Python 3.6.5, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 -- /home/vagrant/.virtualenvs/pulp-smash/bin/python3\r\ncachedir: .pytest_cache\r\nrootdir: /home/vagrant/devel/pulp-smash, inifile:\r\ncollected 7 items\r\n\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py::ProcessLabelsTestCase::test_celerybeat FAILED                                                 [ 14%]\r\n\r\n======================================================================== FAILURES ========================================================================\r\n_________________________________________________________ ProcessLabelsTestCase.test_celerybeat __________________________________________________________\r\n\r\nself = <pulp_smash.tests.pulp2.platform.cli.test_selinux.ProcessLabelsTestCase testMethod=test_celerybeat>\r\n\r\n    def test_celerybeat(self):\r\n        \"\"\"Verify the label of the Pulp celerybeat process.\r\n\r\n            It should have a label of :data:`CELERY_LABEL`.\r\n            \"\"\"\r\n        # Pulp celerybeat is invoked as `/usr/bin/python /usr/bin/celery beat\r\n        # [arguments]`. If this simple approach fails, a more robust approach\r\n        # is to use a regex that searches for 'celery[:space:]+beat'.\r\n>       self._do_test(CELERY_LABEL, 'celery beat')\r\n\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py:100:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py:69: in _do_test\r\n    self.assertEqual(proc.label[proc.label.find(':'):], label, procs)\r\nE   AssertionError: '-' != ':system_r:celery_t:s0'\r\nE   - -\r\nE   + :system_r:celery_t:s0\r\nE    : [Process(label='-', args='/bin/python /usr/bin/celery beat --app=pulp.server.async.celery_instance.celery --scheduler=pulp.server.async.scheduler.Scheduler')]\r\n================================================================ 1 failed in 1.54 seconds ================================================================\r\n```\r\n\r\n#### after\r\n```\r\n(pulp-smash) [vagrant@pulp2 pulp-smash]$ py.test pulp_smash/tests/pulp2/platform/cli/test_selinux.py -xv\r\n================================================================== test session starts ===================================================================\r\nplatform linux -- Python 3.6.5, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 -- /home/vagrant/.virtualenvs/pulp-smash/bin/python3\r\ncachedir: .pytest_cache\r\nrootdir: /home/vagrant/devel/pulp-smash, inifile:\r\ncollected 7 items\r\n\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py::ProcessLabelsTestCase::test_celerybeat SKIPPED                                                [ 14%]\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py::ProcessLabelsTestCase::test_httpd SKIPPED                                                     [ 28%]\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py::ProcessLabelsTestCase::test_reserved_resource_worker_0 SKIPPED                                [ 42%]\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py::ProcessLabelsTestCase::test_resource_manager SKIPPED                                          [ 57%]\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py::FileLabelsTestCase::test_pulp_celery_fc SKIPPED                                               [ 71%]\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py::FileLabelsTestCase::test_pulp_server_fc SKIPPED                                               [ 85%]\r\npulp_smash/tests/pulp2/platform/cli/test_selinux.py::FileLabelsTestCase::test_pulp_streamer_fc SKIPPED                                             [100%]\r\n\r\n=============================================================== 7 skipped in 1.21 seconds ================================================================\r\n```"},"comment":{"url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/comments/386111160","html_url":"https://github.com/PulpQE/pulp-smash/pull/975#issuecomment-386111160","issue_url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/975","id":386111160,"user":{"login":"Ichimonji10","id":1012989,"avatar_url":"https://avatars2.githubusercontent.com/u/1012989?v=4","gravatar_id":"","url":"https://api.github.com/users/Ichimonji10","html_url":"https://github.com/Ichimonji10","followers_url":"https://api.github.com/users/Ichimonji10/followers","following_url":"https://api.github.com/users/Ichimonji10/following{/other_user}","gists_url":"https://api.github.com/users/Ichimonji10/gists{/gist_id}","starred_url":"https://api.github.com/users/Ichimonji10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ichimonji10/subscriptions","organizations_url":"https://api.github.com/users/Ichimonji10/orgs","repos_url":"https://api.github.com/users/Ichimonji10/repos","events_url":"https://api.github.com/users/Ichimonji10/events{/privacy}","received_events_url":"https://api.github.com/users/Ichimonji10/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T20:31:40Z","updated_at":"2018-05-02T20:31:40Z","author_association":"CONTRIBUTOR","body":"Assuming this gets updated and merged, I have a branch ready to go which gets rid of `type('')` calls. See: https://github.com/PulpQE/pulp-smash/compare/master...Ichimonji10:type"}}
{"actor":{"display_login":"Ichimonji10"}}