diff --git a/iotedgedev/deploymentmanifest.py b/iotedgedev/deploymentmanifest.py index ea6030e..e718612 100644 --- a/iotedgedev/deploymentmanifest.py +++ b/iotedgedev/deploymentmanifest.py @@ -157,7 +157,7 @@ class DeploymentManifest: def validate_deployment_manifest(self): validation_success = True try: - if self.is_layered_deployment_schema(): + if not self.is_layered_deployment_schema(): validation_success = self._validate_deployment_manifest_schema() validation_success &= self._validate_create_options() except Exception as err: diff --git a/tests/test_iotedgedev_layereddeployments.py b/tests/test_iotedgedev_layereddeployments.py index feb630c..e19d715 100644 --- a/tests/test_iotedgedev_layereddeployments.py +++ b/tests/test_iotedgedev_layereddeployments.py @@ -1,3 +1,5 @@ +from iotedgedev.envvars import EnvVars +from iotedgedev.output import Output import os import pytest from .utility import ( @@ -5,14 +7,19 @@ from .utility import ( runner_invoke, ) -pytestmark = pytest.mark.unit +pytestmark = pytest.mark.e2e tests_dir = os.path.join(os.getcwd(), "tests") -test_assets_dir = os.path.join(tests_dir, "assets") -test_file_1 = os.path.join(test_assets_dir, "layered_deployment.template.json") test_solution_shared_lib_dir = os.path.join(tests_dir, "assets", "test_solution_shared_lib") +@pytest.fixture(scope="module", autouse=True) +def setup_dotenv(): + output = Output() + envvars = EnvVars(output) + envvars.set_envvar("MODULES_PATH", "../test_solution_shared_lib/modules") + + @pytest.mark.parametrize( "test_file_name", [