Commit 6f75fa90 authored by Kirill Smelkov's avatar Kirill Smelkov

fixup! trun: Spawn user test with sole regular uid/gid in /etc/{passwd,group} database

Even though slapos.core tests seem to mock getgrnam calls[1], disk group
is being looked up in /etc/groups for real which fails, if there is no
such group, e.g. as

    ERROR: test_not_existing (slapos.tests.test_slapgrid.TestSlapgridWithDevPermManagerDevPermEmptyLsblk)
    Traceback (most recent call last):
      File "/srv/slapgrid/slappart3/t/bvi/i/0/parts/slapos.core/slapos/tests/", line 3246, in setUp
      File "/srv/slapgrid/slappart3/t/bvi/i/0/parts/slapos.core/slapos/tests/", line 3230, in setUpExpected
        gid = grp.getgrnam("disk").gr_gid
    KeyError: 'getgrnam(): name not found: disk'

-> Fix it up by also creating "disk" group in our namespace environment.

I'm not sure, but maybe the better long-term fix would be for
slapos.core tests not to access /etc/groups for real and to instead mock
access to this database completely.

Amends commits e6b7993c and b42ccfa5.

/reported-by @tomo
/reported-at nexedi/slapos!1107 (comment 148758)

parent 81b1907a
Pipeline #19005 passed with stage
in 0 seconds