#8918 Nightly failure in test_external_ca.py::TestSelfExternalSelf::test_switch_back_to_self_signed
Closed: fixed 2 years ago by frenaud. Opened 2 years ago by frenaud.

The nightly test test_external_ca.py::TestSelfExternalSelf::test_switch_back_to_self_signed failed in PR#1029, see the following logs and report:

self = <ipatests.test_integration.test_external_ca.TestSelfExternalSelf object at 0x7f5bd0b8f310>

    def test_switch_back_to_self_signed(self):

        # for journalctl --since
        switch_time = time.strftime('%H:%M:%S')
        # switch back to self-signed CA
        result = self.master.run_command([paths.IPA_CACERT_MANAGE, 'renew',
                                          '--self-signed'])
        assert result.returncode == 0

        # Confirm there is no traceback in the journal
        result = match_in_journal(self.master, since=switch_time,
                                  string='Traceback')
        assert not bool(result), ('"Traceback" keyword found in the journal.'
                                  'Please check further')

        # Check if pki-tomcatd was started after switching back.
        result = match_in_journal(self.master, since=switch_time,
                                  string=PKI_START_STR)
>       assert bool(result), ('pki_tomcatd not started after switching back to'
                              'self-signed CA')
E       AssertionError: pki_tomcatd not started after switching back toself-signed CA
E       assert False
E        +  where False = bool(None)

The issue happens because the test was executed just around midnight and the variable storing the time only contains the %H:%M:%S part of the date.
Test scenario:
- note the current time (23:59:37 in this case)
- run ipa-cacert-manage renew --self-signed
- make sure that the journal after the noted time shows that pki-tomcatd successfully started. The date has changed and the time is now 00:00:31. Using journalctl --since 23:59:37 won't find any entry since it's earlier.


Metadata Update from @frenaud:
- Issue assigned to frenaud

2 years ago

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

2 years ago

master:

  • eb8a6d0 ipatests: use whole date when calling journalctl --since

ipa-4-9:

  • b2e6292 ipatests: use whole date when calling journalctl --since

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

2 years ago

Login to comment on this ticket.

Metadata