#8005 User field separator uses '$$' within ipaSELinuxUserMapOrder
Closed: fixed 4 years ago by abbra. Opened 4 years ago by frenaud.

The nightly test test_webui_policy.py is failing in test_selinuxusermap.py::test_selinuxusermap::()::test_add_different_rules

self = <ipatests.test_webui.test_selinuxusermap.test_selinuxusermap object at 0x7fa74e488048>

@screenshot
def test_add_different_rules(self):
"""
Test adding different SELinux usermap rules
"""
self.init_app()

self.navigate_to_entity('config')
old_selinux_order = self.get_field_value('ipaselinuxusermaporder')
new_selinux_order = '{}${}${}${}${}'.format(
old_selinux_order,
selinuxmap.DATA_MLS_RANGE['add'][1][2],
selinuxmap.DATA_MCS_RANGE['add'][1][2],
selinuxmap.DATA_MCS_COMMAS['add'][1][2],
selinuxmap.DATA_MLS_SINGLE_VAL['add'][1][2])
self.fill_input('ipaselinuxusermaporder', new_selinux_order)
self.facet_button_click('save')

# test add MLS range rule
> self.add_record(selinuxmap.ENTITY, selinuxmap.DATA_MLS_RANGE)

/usr/lib/python3.7/site-packages/ipatests/test_webui/test_selinuxusermap.py:287:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.7/site-packages/ipatests/test_webui/ui_driver.py:1431: in add_record
self.assert_no_dialog()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ipatests.test_webui.test_selinuxusermap.test_selinuxusermap object at 0x7fa74e488048>

def assert_no_dialog(self):
"""
Assert that no dialog is opened
"""
dialogs = self.get_dialogs()
> assert not dialogs, 'Invalid state: dialog opened'
E       AssertionError: Invalid state: dialog opened

/usr/lib/python3.7/site-packages/ipatests/test_webui/ui_driver.py:2024: AssertionError

See logs for fedora-29/test_webui_policy run 2019-07-05 and fedora-30/test_webui_policy run 2019-07-03

Need to check if it is a test issue or a bug in the product.


Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/3372
- Issue assigned to slev

4 years ago

Metadata Update from @frenaud:
- Issue untagged with: tests
- Issue set to the milestone: FreeIPA 4.8.1

4 years ago

Issue was introduced in ipa 4.8.0, hence setting milestone to 4.8.1

The issue is not only a test issue but a real bug. With freeipa 4.8.0, the ipaSELinuxUserMapOrder contains $$ as separators instead of $:

# ipa config-show 
[...]
  SELinux user map order: guest_u:s0$$xguest_u:s0$$user_u:s0$$staff_u:s0-s0:c0.c1023$$sysadm_u:s0-s0:c0.c1023$$unconfined_u:s0-s0:c0.c1023
[...]

Metadata Update from @frenaud:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1729099

4 years ago

master:

  • ac1ea0e Fix test_webui.test_selinuxusermap

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

4 years ago

ipa-4-8:

  • 96af539 Fix test_webui.test_selinuxusermap

Login to comment on this ticket.

Metadata