Procházet zdrojové kódy

fix 'requirements' path in test/test_build.py

Without this patch the test fails when run from project base directory.
Gilles Filippini před 1 rokem
rodič
revize
59d5293480
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      test/test_build.py

+ 2 - 1
test/test_build.py

@@ -4,13 +4,14 @@ Test that nginx-proxy-tester can build successfully
 import pytest
 import docker
 import re
+import os
 
 client = docker.from_env()
 
 @pytest.fixture(scope = "session")
 def docker_build(request):
     # Define Dockerfile path
-    dockerfile_path = "requirements/"
+    dockerfile_path = os.path.join(os.path.dirname(__file__), "requirements/")
     dockerfile_name = "Dockerfile-nginx-proxy-tester"
 
     # Build the Docker image