зеркало из https://github.com/Azure/iotedgedev.git
Fix tests
This commit is contained in:
Родитель
07e543a56f
Коммит
4f460e6c44
|
@ -1,5 +1,3 @@
|
|||
from iotedgedev.envvars import EnvVars
|
||||
from iotedgedev.output import Output
|
||||
import os
|
||||
import pytest
|
||||
from .utility import (
|
||||
|
@ -13,13 +11,6 @@ tests_dir = os.path.join(os.getcwd(), "tests")
|
|||
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",
|
||||
[
|
||||
|
@ -30,7 +21,7 @@ def setup_dotenv():
|
|||
def test_build_and_push(test_file_name):
|
||||
os.chdir(test_solution_shared_lib_dir)
|
||||
|
||||
result = runner_invoke(['build', '--push', '-f', f'../layered_deployment_templates/{test_file_name}', '-P', get_platform_type()])
|
||||
result = runner_invoke(['build', '--push', '-f', test_file_name, '-P', get_platform_type()])
|
||||
|
||||
assert 'sample_module:0.0.1-RC' in result.output
|
||||
assert 'BUILD COMPLETE' in result.output
|
||||
|
|
Загрузка…
Ссылка в новой задаче