def test_exec_in_container_multiple():
    """same as above, except we exec into a particular service"""
    multiple = DockerCompose(context=FIXTURES / "port_multiple")
    with multiple:
        sn = "alpine2"  # service name
        host, port = multiple.get_service_host_and_port(service_name=sn)
        url = f"http://{host}:{port}"
        multiple.wait_for(url)

        # unchanged
        code, body = fetch(url)
        assert code == 200
        assert "test_exec_in_container" not in body

        # change it
        multiple.exec_in_container(
            command=["sh", "-c", 'echo "test_exec_in_container" > /usr/share/nginx/html/index.html'], service_name=sn
        )

        # and it is changed
        code, body = fetch(url)
        assert code == 200
        assert "test_exec_in_container" in body
same as above, except we exec into a particular service
core/tests/test_compose.py