From 5dc041fe676e629e6583130199d01b8b3f11007f Mon Sep 17 00:00:00 2001 From: luksi1 Date: Mon, 26 Sep 2022 11:16:19 +0000 Subject: [PATCH] Updated tests --- tests/test_pytorch_env.py | 13 +++++++------ tests/test_r_env.py | 11 ++++++----- tests/test_tensorflow_env.py | 12 ++++++------ 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/tests/test_pytorch_env.py b/tests/test_pytorch_env.py index 8478195af..ae3a04a3b 100644 --- a/tests/test_pytorch_env.py +++ b/tests/test_pytorch_env.py @@ -92,12 +92,13 @@ def test_dockerfile(self): assert "ADD http://aiav2.vgregion.se/VGC%20Root%20CA%20v2.crt /tmp/vgc_root.der" in lines assert "ADD http://aiav2.vgregion.se/VGC%20Issuing%201%20CA%20v2.crt /tmp/vgc_issuing1.der" in lines assert "ADD http://aiav2.vgregion.se/VGC%20Issuing%202%20CA%20v2.crt /tmp/vgc_issuing2.der" in lines - assert """RUN pip install -r requirements.txt \\ - && openssl x509 -inform der -in /tmp/vgc_root.der -out /usr/local/share/ca-certificates/vgc_root.crt \\ - && openssl x509 -inform der -in /tmp/vgc_issuing1.der -out /usr/local/share/ca-certificates/vgc_issuing1.crt \\ - && openssl x509 -inform der -in /tmp/vgc_issuing2.der -out /usr/local/share/ca-certificates/vgc_issuing2.crt \\ - && update-ca-certificates""" in dockerfile_text - + assert "pip install -r requirements.txt" + assert "openssl x509 -inform der -in /tmp/vgc_root.der -out /usr/local/share/ca-certificates/vgc_root.crt" + assert "openssl x509 -inform der -in /tmp/vgc_issuing1.der -out /usr/local/share/ca-certificates/vgc_issuing1.crt" + assert "openssl x509 -inform der -in /tmp/vgc_issuing1_2.der -out /usr/local/share/ca-certificates/vgc_issuing1_2.crt" + assert "openssl x509 -inform der -in /tmp/vgc_issuing2.der -out /usr/local/share/ca-certificates/vgc_issuing2.crt" + assert "update-ca-certificates" + def test_folders(self): module_name = "project_name" if pytest.param.get("project_name"): diff --git a/tests/test_r_env.py b/tests/test_r_env.py index 0145cf516..ea0ee359a 100644 --- a/tests/test_r_env.py +++ b/tests/test_r_env.py @@ -55,11 +55,12 @@ def test_dockerfile(self): assert "ADD http://aiav2.vgregion.se/VGC%20Root%20CA%20v2.crt /tmp/vgc_root.der" in lines assert "ADD http://aiav2.vgregion.se/VGC%20Issuing%201%20CA%20v2.crt /tmp/vgc_issuing1.der" in lines assert "ADD http://aiav2.vgregion.se/VGC%20Issuing%202%20CA%20v2.crt /tmp/vgc_issuing2.der" in lines - assert """RUN pip install -r requirements.txt \\ - && openssl x509 -inform der -in /tmp/vgc_root.der -out /usr/local/share/ca-certificates/vgc_root.crt \\ - && openssl x509 -inform der -in /tmp/vgc_issuing1.der -out /usr/local/share/ca-certificates/vgc_issuing1.crt \\ - && openssl x509 -inform der -in /tmp/vgc_issuing2.der -out /usr/local/share/ca-certificates/vgc_issuing2.crt \\ - && update-ca-certificates""" in dockerfile_text + assert "pip install -r requirements.txt" + assert "openssl x509 -inform der -in /tmp/vgc_root.der -out /usr/local/share/ca-certificates/vgc_root.crt" + assert "openssl x509 -inform der -in /tmp/vgc_issuing1.der -out /usr/local/share/ca-certificates/vgc_issuing1.crt" + assert "openssl x509 -inform der -in /tmp/vgc_issuing1_2.der -out /usr/local/share/ca-certificates/vgc_issuing1_2.crt" + assert "openssl x509 -inform der -in /tmp/vgc_issuing2.der -out /usr/local/share/ca-certificates/vgc_issuing2.crt" + assert "update-ca-certificates" def test_folders(self): module_name = pytest.param.get("project_name") diff --git a/tests/test_tensorflow_env.py b/tests/test_tensorflow_env.py index cd07774b4..2aaecfc72 100644 --- a/tests/test_tensorflow_env.py +++ b/tests/test_tensorflow_env.py @@ -92,12 +92,12 @@ def test_dockerfile(self): assert "ADD http://aiav2.vgregion.se/VGC%20Root%20CA%20v2.crt /tmp/vgc_root.der" in lines assert "ADD http://aiav2.vgregion.se/VGC%20Issuing%201%20CA%20v2.crt /tmp/vgc_issuing1.der" in lines assert "ADD http://aiav2.vgregion.se/VGC%20Issuing%202%20CA%20v2.crt /tmp/vgc_issuing2.der" in lines - assert """RUN pip install -r requirements.txt \\ - && openssl x509 -inform der -in /tmp/vgc_root.der -out /usr/local/share/ca-certificates/vgc_root.crt \\ - && openssl x509 -inform der -in /tmp/vgc_issuing1.der -out /usr/local/share/ca-certificates/vgc_issuing1.crt \\ - && openssl x509 -inform der -in /tmp/vgc_issuing2.der -out /usr/local/share/ca-certificates/vgc_issuing2.crt \\ - && update-ca-certificates""" in dockerfile_text - + assert "pip install -r requirements.txt" + assert "openssl x509 -inform der -in /tmp/vgc_root.der -out /usr/local/share/ca-certificates/vgc_root.crt" + assert "openssl x509 -inform der -in /tmp/vgc_issuing1.der -out /usr/local/share/ca-certificates/vgc_issuing1.crt" + assert "openssl x509 -inform der -in /tmp/vgc_issuing1_2.der -out /usr/local/share/ca-certificates/vgc_issuing1_2.crt" + assert "openssl x509 -inform der -in /tmp/vgc_issuing2.der -out /usr/local/share/ca-certificates/vgc_issuing2.crt" + assert "update-ca-certificates" def test_folders(self): module_name = "project_name" if pytest.param.get("project_name"):