Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded user/group per file is reporting group as a list, not a string #183

Closed
rcritten opened this issue Jan 18, 2021 · 2 comments
Closed
Assignees

Comments

@rcritten
Copy link
Collaborator

IPA test test_integration/test_ipahealthcheck.py::TestIpaHealthCheckFileCheck::test_tomcat_filecheck_bad_group is failing in 0.8 with:

self = <ipatests.test_integration.test_ipahealthcheck.TestIpaHealthCheckFileCheck object at 0x7f33b4d6df70>
modify_permissions = <function modify_permissions.<locals>._modify_permission at 0x7f33b549ddc0>

    def test_tomcat_filecheck_bad_group(self, modify_permissions):
        modify_permissions(self.master, path=paths.CA_CS_CFG_PATH,
                           group='root')
        returncode, data = run_healthcheck(
            self.master,
            "ipahealthcheck.ipa.files",
            "TomcatFileCheck",
            failures_only=True,
        )
        assert returncode == 1
        for check in data:
            assert check["result"] == "WARNING"
            assert check["kw"]["key"] == \
                '_var_lib_pki_pki-tomcat_conf_ca_CS.cfg_group'
            assert check["kw"]["type"] == 'group'
>           assert check["kw"]["expected"] == 'pkiuser'
E           AssertionError: assert ['pkiuser'] == 'pkiuser'
E             +['pkiuser']
E             -'pkiuser'
@rcritten rcritten self-assigned this Jan 18, 2021
rcritten added a commit to rcritten/freeipa-healthcheck that referenced this issue Jan 18, 2021
This was caused by the code to allow multiple possible
file owner and group. The expected value for group wasn't
being converted into a string so was kept as a list.

Test updated to catch this situation.

freeipa#183
@rcritten
Copy link
Collaborator Author

#184

rcritten added a commit that referenced this issue Jan 18, 2021
This was caused by the code to allow multiple possible
file owner and group. The expected value for group wasn't
being converted into a string so was kept as a list.

Test updated to catch this situation.

#183
@rcritten
Copy link
Collaborator Author

joeldavidparker added a commit to joeldavidparker/freeipa-healthcheck that referenced this issue Jun 24, 2022
This was caused by the code to allow multiple possible
file owner and group. The expected value for group wasn't
being converted into a string so was kept as a list.

Test updated to catch this situation.

freeipa/freeipa-healthcheck#183
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant