File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -107,15 +107,21 @@ def docker_runner(params):
107107 """Starts a Docker container before tests and gracefully terminates it after."""
108108
109109 def is_docker_running ():
110- """Check if Docker has been run ."""
110+ """Check if Docker is running and optionally skip pulling the image ."""
111111 try :
112112 subprocess .run (
113113 ["docker" , "info" ],
114114 stdout = subprocess .DEVNULL ,
115115 stderr = subprocess .DEVNULL ,
116116 check = True ,
117117 )
118- subprocess .run (["docker" , "pull" , LOCALNET_IMAGE_NAME ], check = True )
118+
119+ skip_pull = os .getenv ("SKIP_PULL" , "0" ) == "1"
120+ if not skip_pull :
121+ subprocess .run (["docker" , "pull" , LOCALNET_IMAGE_NAME ], check = True )
122+ else :
123+ print (f"[SKIP_PULL=1] Skipping 'docker pull { LOCALNET_IMAGE_NAME } '" )
124+
119125 return True
120126 except subprocess .CalledProcessError :
121127 return False
You can’t perform that action at this time.
0 commit comments