From 721aab9da8b49f8fae8012431a8af8f16bbbdb91 Mon Sep 17 00:00:00 2001 From: Jeffrey Lester Date: Tue, 11 Jun 2024 10:05:49 -0700 Subject: [PATCH] Re-add sudo to docker start/stop commands --- src/test/src/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/src/common.py b/src/test/src/common.py index 1ff49848..d5879b08 100644 --- a/src/test/src/common.py +++ b/src/test/src/common.py @@ -59,7 +59,7 @@ def start_docker_daemon(): return_code = subprocess.call("open --background -a Docker", shell=True) elif "linux" in sys.platform.lower(): return_code = subprocess.call( - "service docker start; systemctl start docker", shell=True + "sudo service docker start; sudo systemctl start docker.socket", shell=True ) else: raise RuntimeError(f"Incompatible testing platform: {sys.platform}") @@ -86,7 +86,7 @@ def stop_docker_daemon(): return_code = subprocess.call("osascript -e 'quit app \"Docker\"'", shell=True) elif "linux" in sys.platform.lower(): return_code = subprocess.call( - "service docker stop; systemctl stop docker.socket", shell=True + "sudo service docker stop; sudo systemctl stop docker.socket", shell=True ) else: raise RuntimeError(f"Incompatible testing platform: {sys.platform}")