Skip to content

Conversation

ricardobranco777
Copy link

@ricardobranco777 ricardobranco777 commented Aug 21, 2025

Behaviour changed upstream with containers/podman#25942

Verification run: https://openqa.opensuse.org/tests/5261848

Fixes:

# Test messages # test_container_mounts
# failure: 

AssertionError: 'size=456k,rprivate,nosuid,nodev,tmpcopyup' != 'size=456k,rw,rprivate,nosuid,nodev,tmpcopyup'
- size=456k,rprivate,nosuid,nodev,tmpcopyup
+ size=456k,rw,rprivate,nosuid,nodev,tmpcopyup
?          +++
self = <podman.tests.integration.test_container_create.ContainersIntegrationTest testMethod=test_container_mounts>

    def test_container_mounts(self):
        """Test passing mounts"""
        with self.subTest("Check bind mount"):
            mount = {
                "type": "bind",
                "source": "/etc/hosts",
                "target": "/test",
                "read_only": True,
                "relabel": "Z",
            }
            container = self.client.containers.create(
                self.alpine_image, command=["cat", "/test"], mounts=[mount]
            )
            self.containers.append(container)
            self.assertIn(
                f"{mount['source']}:{mount['target']}:ro,Z,rprivate,rbind",
                container.attrs.get('HostConfig', {}).get('Binds', list()),
            )
    
            # check if container can be started and exits with EC == 0
            container.start()
            container.wait()
    
            self.assertEqual(container.attrs.get('State', dict()).get('ExitCode', 256), 0)
    
        with self.subTest("Check tmpfs mount"):
            mount = {"type": "tmpfs", "source": "tmpfs", "target": "/test", "size": "456k"}
            container = self.client.containers.create(
                self.alpine_image, command=["df", "-h"], mounts=[mount]
            )
            self.containers.append(container)
>           self.assertEqual(
                container.attrs.get('HostConfig', {}).get('Tmpfs', {}).get(mount['target']),
                f"size={mount['size']},rw,rprivate,nosuid,nodev,tmpcopyup",
            )
E           AssertionError: 'size=456k,rprivate,nosuid,nodev,tmpcopyup' != 'size=456k,rw,rprivate,nosuid,nodev,tmpcopyup'
E           - size=456k,rprivate,nosuid,nodev,tmpcopyup
E           + size=456k,rw,rprivate,nosuid,nodev,tmpcopyup
E           ?          +++

podman/tests/integration/test_container_create.py:274: AssertionError

Behaviour changed upstream with containers/podman#25942

Signed-off-by: Ricardo Branco <[email protected]>
Copy link
Contributor

openshift-ci bot commented Aug 21, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ricardobranco777
Once this PR has been reviewed and has the lgtm label, please assign jwhonce for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant