@@ -23,10 +23,18 @@ def fixture_custom_bridge_network() -> Iterator[Network]:
2323 Yield a custom bridge network which containers can connect to.
2424 """
2525 client = docker .from_env ()
26- network = client .networks .create (
27- name = 'test-vws-bridge-' + uuid .uuid4 ().hex ,
28- driver = 'bridge' ,
29- )
26+ try :
27+ network = client .networks .create (
28+ name = 'test-vws-bridge-' + uuid .uuid4 ().hex ,
29+ driver = 'bridge' ,
30+ )
31+ except docker .errors .NotFound :
32+ # On Windows the "bridge" network driver is not available and we use
33+ # the "nat" driver instead.
34+ network = client .networks .create (
35+ name = 'test-vws-bridge-' + uuid .uuid4 ().hex ,
36+ driver = 'nat' ,
37+ )
3038 try :
3139 yield network
3240 finally :
@@ -56,11 +64,16 @@ def test_build_and_run(
5664 vws_tag = 'vws-mock-vws:latest-' + random
5765 vwq_tag = 'vws-mock-vwq:latest-' + random
5866
59- client .images .build (
60- path = str (repository_root ),
61- dockerfile = str (base_dockerfile ),
62- tag = base_tag ,
63- )
67+ try :
68+ client .images .build (
69+ path = str (repository_root ),
70+ dockerfile = str (base_dockerfile ),
71+ tag = base_tag ,
72+ )
73+ except docker .errors .BuildError as exc :
74+ assert 'no matching manifest for windows/amd64' in str (exc )
75+ reason = 'We do not currently support using Windows containers.'
76+ pytest .skip (reason )
6477
6578 storage_image , _ = client .images .build (
6679 path = str (repository_root ),
0 commit comments