Esempio n. 1
0
 def test_create_with_host_network(self, docker_client: DockerClient, create_container):
     info = create_container("alpine", network="host")
     network = docker_client.get_network(info.container_name)
     assert "host" == network
Esempio n. 2
0
    def test_get_network_non_existing_container(self, docker_client: DockerClient):
        # TODO: define behavior
        with pytest.raises(ContainerException) as ex:
            docker_client.get_network("this_container_does_not_exist")

        assert ex.match("[Nn]o such object")
Esempio n. 3
0
 def test_get_network(self, docker_client: DockerClient, dummy_container):
     n = docker_client.get_network(dummy_container.container_name)
     assert "default" == n