tests: disable idmapping feature in overlay

that is the expectation of the tests when they check for the mapping
in the mounted layers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2023-01-31 10:01:30 +01:00
parent 9e879f0ed7
commit 325285e8a0
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772
2 changed files with 6 additions and 0 deletions

View File

@ -2098,6 +2098,9 @@ func (d *Driver) supportsIDmappedMounts() bool {
// SupportsShifting tells whether the driver support shifting of the UIDs/GIDs in an userNS
func (d *Driver) SupportsShifting() bool {
if os.Getenv("_CONTAINERS_OVERLAY_DISABLE_IDMAP") == "yes" {
return false
}
if d.options.mountProgram != "" {
return true
}

View File

@ -21,6 +21,9 @@ function setup() {
TESTDIR=${BATS_TMPDIR}/tmp.${suffix}
rm -fr ${TESTDIR}
mkdir -p ${TESTDIR}/{root,runroot}
# disable idmapped mounts in the overlay driver, since that
# is the expectation in the idmaps.bats tests.
export _CONTAINERS_OVERLAY_DISABLE_IDMAP=yes
}
# Delete the unique root directory and a runroot directory.