def test_docker_workspace(self) -> None:
    fs = fsspec.filesystem('memory')
    fs.mkdirs('test_workspace/bar', exist_ok=True)
    with fs.open('test_workspace/bar/foo.sh', 'w') as f:
        f.write('exit 0')
    role = Role(name='ping', image='busybox', entrypoint='sh', args=['bar/foo.sh'])
    workspace = DockerWorkspace()
    workspace.build_workspace_and_update_role(role, 'memory://test_workspace')
    self.assertNotEqual('busybox', role.image)
def test_docker_workspace(self) -> None:
    fs = fsspec.filesystem('memory')
    fs.mkdirs('test_workspace/bar', exist_ok=True)
    with fs.open('test_workspace/bar/foo.sh', 'w') as f:
        f.write('exit 0')
    role = Role(name='ping', image='busybox', entrypoint='sh', args=['bar/foo.sh'])
    workspace = DockerWorkspace()
    workspace.build_workspace_and_update_role(role, 'memory://test_workspace')
    self.assertNotEqual('busybox', role.image)