kopia lustrzana https://github.com/jupyterhub/repo2docker
Restore env vars after test
rodzic
3e458e3299
commit
1bd3d276f3
|
@ -112,6 +112,10 @@ def test_registry(registry, dind):
|
||||||
r2d = make_r2d(["--image", image_name, "--push", "--no-run", str(HERE)])
|
r2d = make_r2d(["--image", image_name, "--push", "--no-run", str(HERE)])
|
||||||
|
|
||||||
docker_host, cert_dir = dind
|
docker_host, cert_dir = dind
|
||||||
|
|
||||||
|
old_environ = os.environ.copy()
|
||||||
|
|
||||||
|
try:
|
||||||
os.environ["DOCKER_HOST"] = docker_host
|
os.environ["DOCKER_HOST"] = docker_host
|
||||||
os.environ["DOCKER_CERT_PATH"] = str(cert_dir / "client")
|
os.environ["DOCKER_CERT_PATH"] = str(cert_dir / "client")
|
||||||
os.environ["DOCKER_TLS_VERIFY"] = "1"
|
os.environ["DOCKER_TLS_VERIFY"] = "1"
|
||||||
|
@ -119,3 +123,6 @@ def test_registry(registry, dind):
|
||||||
|
|
||||||
proc = subprocess.run(["docker", "manifest", "inspect", "--insecure", image_name])
|
proc = subprocess.run(["docker", "manifest", "inspect", "--insecure", image_name])
|
||||||
assert proc.returncode == 0
|
assert proc.returncode == 0
|
||||||
|
finally:
|
||||||
|
os.environ.clear()
|
||||||
|
os.environ.update(old_environ)
|
Ładowanie…
Reference in New Issue