#9447 Nightly test failure in test_sso.py
Closed: fixed by frenaud. Opened by frenaud.

Issue

The nigthly test test_sso.py started failing after changes done on ipa-tuura repository (https://github.com/freeipa/ipa-tuura/commit/f12592cea496818af782f953e0e9643c9ea440b5), see the PR #2969 with the following logs and report:

cls = <class 'ipatests.test_integration.test_sso.TestSsoBridge'>
mh = <pytest_multihost.plugin.MultihostFixture object at 0x7f757a482450>
    @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:39: in setup_scim_server
    host.run_command(["python", "manage.py", "makemigrations", "ipatuura"],
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <ipatests.pytest_ipa.integration.host.Host replica0.ipa.test (replica)>
argv = ['python', 'manage.py', 'makemigrations', 'ipatuura'], set_env = True
stdin_text = None, log_stdout = True, raiseonerr = True
cwd = '/opt/ipa-tuura/src/ipa-tuura', 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', 'manage.py', 'makemigrations', 'ipatuura']' 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: No installed app with label 'ipatuura'.

The repo ipatuura was renamed scim and the test code needs to be adapted.


Metadata Update from @frenaud:
- Issue tagged with: test-failure, tests

Metadata Update from @antorres:
- Issue assigned to antorres

PR https://github.com/freeipa/freeipa/pull/6991

master:

  • 2bc247d8310596c96e13236d9393f0c2e725f091 ipatests: rename 'ipatuura' directory to 'scim' in bridge tests

ipa-4-11:

  • 47463294097e01e08b0df3a51f3e2ccc9df9e309 ipatests: rename 'ipatuura' directory to 'scim' in bridge tests

ipa-4-10:

  • 1c692f58e980bb58d70674248fba65bdfd367e15 ipatests: rename 'ipatuura' directory to 'scim' in bridge tests

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata