#9476 Nightly test failure in test_sso.py::TestSsoBridge::test_sso_login_with_ipa_user
Opened a year ago by frenaud. Modified 4 months ago

Issue

The nightly test test_sso.py::TestSsoBridge::test_sso_login_with_ipa_user started failing after ipa-tuura commit https://github.com/freeipa/ipa-tuura/commit/90c36021a1036588342158da44dc929be6d4ce47 as it removed the script prepare_sssd.py that is called by the test.

Nightly PR #3137 with the following report:

cls = <class 'ipatests.test_integration.test_sso.TestSsoBridge'>
mh = <pytest_multihost.plugin.MultihostFixture object at 0x7f2ddb859390>

    @classmethod
    def install(cls, mh):
        cls.keycloak = cls.replicas[0]
        cls.bridge = cls.replicas[1]
        tasks.install_master(cls.master, extra_args=['--no-dnssec-validation'])
        tasks.install_client(cls.master, cls.replicas[0],
                             extra_args=["--mkhomedir"])
        tasks.install_client(cls.master, cls.replicas[1],
                             extra_args=["--mkhomedir"])
        tasks.clear_sssd_cache(cls.master)
        tasks.clear_sssd_cache(cls.keycloak)
        tasks.clear_sssd_cache(cls.bridge)
        tasks.kinit_admin(cls.master)
        username = 'ipauser1'
        password = cls.keycloak.config.admin_password
        tasks.create_active_user(cls.master, username, password)
        create_keycloak.setup_keycloakserver(cls.keycloak)
        create_keycloak.setup_keycloak_client(cls.keycloak)
>       create_bridge.setup_scim_server(cls.bridge)

test_integration/test_sso.py:103: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pytest_ipa/integration/create_bridge.py:20: in setup_scim_server
    host.run_command(["python", "./prepare_sssd.py"],
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ipatests.pytest_ipa.integration.host.Host replica0.ipa.test (replica)>
argv = ['python', './prepare_sssd.py'], set_env = True, stdin_text = None
log_stdout = True, raiseonerr = True, cwd = '/opt/ipa-tuura/src/install'
bg = False, encoding = 'utf-8', ok_returncode = 0

    def run_command(self, argv, set_env=True, stdin_text=None,
                    log_stdout=True, raiseonerr=True,
                    cwd=None, bg=False, encoding='utf-8', ok_returncode=0):
        """Wrapper around run_command to log stderr on raiseonerr=True

        :param ok_returncode: return code considered to be correct,
                              you can pass an integer or sequence of integers
        """
        result = super().run_command(
            argv, set_env=set_env, stdin_text=stdin_text,
            log_stdout=log_stdout, raiseonerr=False, cwd=cwd, bg=bg,
            encoding=encoding
        )
        # in FIPS mode SSH may print noise to stderr, remove the string
        # "FIPS mode initialized" + optional newline.
        result.stderr_bytes = FIPS_NOISE_RE.sub(b'', result.stderr_bytes)
        try:
            result_ok = result.returncode in ok_returncode
        except TypeError:
            result_ok = result.returncode == ok_returncode
        if not result_ok and raiseonerr:
            result.log.error('stderr: %s', result.stderr_text)
>           raise subprocess.CalledProcessError(
                result.returncode, argv,
                result.stdout_text, result.stderr_text
            )
E           subprocess.CalledProcessError: Command '['python', './prepare_sssd.py']' returned non-zero exit status 2.

pytest_ipa/integration/host.py:202: CalledProcessError
 -----------------------------Captured stderr setup------------------------------ 
ipa: WARNING: ipa: ERROR: DNS zone with name "122.168.192.in-addr.arpa." already exists

ipa: ERROR: stderr: python: can't open file '/opt/ipa-tuura/src/install/./prepare_sssd.py': [Errno 2] No such file or directory

The test code needs to be adapted.


Metadata Update from @frenaud:
- Issue assigned to antorres

a year ago

After discussion with @antorres, the test will be disabled.
Long term goal is to create tests in ipa-tuura project. Keeping this ticket open until the tests are added in ipa-tuura and obsolete code is removed from freeipa.

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/7099

a year ago

master:

  • 5028b39 Integration tests: disable test_sso

ipa-4-11:

  • 71b40f2 Integration tests: disable test_sso

ipa-4-10:

  • 293502b Integration tests: disable test_sso

Metadata Update from @ftrivino:
- Issue assigned to ftrivino (was: antorres)

4 months ago

Log in to comment on this ticket.

Metadata