File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,10 @@ def git_toplevel():
52
52
str: The path of the top level directory of the current git repo.
53
53
54
54
"""
55
+ try :
56
+ subp .check_call (["which" , "git" ])
57
+ except subp .CalledProcessError :
58
+ pytest .skip (msg = "git executable was not found on the host" )
55
59
return (
56
60
subp .check_output (["git" , "rev-parse" , "--show-toplevel" ])
57
61
.decode ("utf-8" )
@@ -73,6 +77,10 @@ def netbox_docker_repo_dirpaths(pytestconfig, git_toplevel):
73
77
]
74
78
}
75
79
"""
80
+ try :
81
+ subp .check_call (["which" , "docker" ])
82
+ except subp .CalledProcessError :
83
+ pytest .skip (msg = "docker executable was not found on the host" )
76
84
netbox_versions_by_repo_dirpaths = {}
77
85
for netbox_version in pytestconfig .option .netbox_versions :
78
86
repo_version_tag = get_netbox_docker_version_tag (netbox_version = netbox_version )
@@ -196,11 +204,6 @@ def docker_compose_file(pytestconfig, netbox_docker_repo_dirpaths):
196
204
clean_netbox_docker_tmpfiles ()
197
205
clean_docker_objects ()
198
206
199
- try :
200
- subp .check_call (["which" , "docker" ])
201
- except subp .CalledProcessError :
202
- pytest .skip (msg = "docker executable was not found on the host" )
203
-
204
207
compose_files = []
205
208
206
209
for (
You can’t perform that action at this time.
0 commit comments