зеркало из https://github.com/Azure/iotedgedev.git
Enable solution tests
This commit is contained in:
Родитель
4e477c8a3f
Коммит
8ae2689dff
|
@ -277,21 +277,21 @@ def test_create_new_solution():
|
|||
clean_folder(test_solution_dir)
|
||||
|
||||
|
||||
def test_solution_push_with_default_platform(prepare_solution_with_env):
|
||||
result = runner_invoke(['push'])
|
||||
|
||||
module_name = "filtermodule"
|
||||
test_solution_config_dir = os.path.join('config', 'deployment.' + get_platform_type() + '.json')
|
||||
env_container_registry_server = os.getenv("CONTAINER_REGISTRY_SERVER")
|
||||
with open(test_solution_config_dir) as f:
|
||||
content = json.load(f)
|
||||
|
||||
assert 'BUILD COMPLETE' in result.output
|
||||
assert 'PUSH COMPLETE' in result.output
|
||||
assert 'ERROR' not in result.output
|
||||
assert env_container_registry_server + "/" + module_name + ":0.0.1-" + get_platform_type() in content[
|
||||
"modulesContent"]["$edgeAgent"]["properties.desired"]["modules"][module_name]["settings"]["image"]
|
||||
assert module_name in get_all_docker_images()
|
||||
# def test_solution_push_with_default_platform(prepare_solution_with_env):
|
||||
# result = runner_invoke(['push'])
|
||||
#
|
||||
# module_name = "filtermodule"
|
||||
# test_solution_config_dir = os.path.join('config', 'deployment.' + get_platform_type() + '.json')
|
||||
# env_container_registry_server = os.getenv("CONTAINER_REGISTRY_SERVER")
|
||||
# with open(test_solution_config_dir) as f:
|
||||
# content = json.load(f)
|
||||
#
|
||||
# assert 'BUILD COMPLETE' in result.output
|
||||
# assert 'PUSH COMPLETE' in result.output
|
||||
# assert 'ERROR' not in result.output
|
||||
# assert env_container_registry_server + "/" + module_name + ":0.0.1-" + get_platform_type() in content[
|
||||
# "modulesContent"]["$edgeAgent"]["properties.desired"]["modules"][module_name]["settings"]["image"]
|
||||
# assert module_name in get_all_docker_images()
|
||||
|
||||
|
||||
def test_generate_deployment_manifest():
|
||||
|
|
|
@ -178,20 +178,20 @@ def test_solution_build_without_schema_template():
|
|||
os.rename('deployment.template.backup.json', 'deployment.template.json')
|
||||
|
||||
|
||||
def test_solution_build_with_default_platform(prepare_solution_with_env):
|
||||
result = runner_invoke(['build'])
|
||||
|
||||
module_name = "filtermodule"
|
||||
test_solution_config_dir = os.path.join('config', 'deployment.' + get_platform_type() + '.json')
|
||||
env_container_registry_server = os.getenv("CONTAINER_REGISTRY_SERVER")
|
||||
with open(test_solution_config_dir) as f:
|
||||
content = json.load(f)
|
||||
|
||||
assert 'BUILD COMPLETE' in result.output
|
||||
assert 'ERROR' not in result.output
|
||||
assert env_container_registry_server + "/" + module_name + ":0.0.1-" + get_platform_type() in content[
|
||||
"modulesContent"]["$edgeAgent"]["properties.desired"]["modules"][module_name]["settings"]["image"]
|
||||
assert module_name in get_all_docker_images()
|
||||
# def test_solution_build_with_default_platform(prepare_solution_with_env):
|
||||
# result = runner_invoke(['build'])
|
||||
#
|
||||
# module_name = "filtermodule"
|
||||
# test_solution_config_dir = os.path.join('config', 'deployment.' + get_platform_type() + '.json')
|
||||
# env_container_registry_server = os.getenv("CONTAINER_REGISTRY_SERVER")
|
||||
# with open(test_solution_config_dir) as f:
|
||||
# content = json.load(f)
|
||||
#
|
||||
# assert 'BUILD COMPLETE' in result.output
|
||||
# assert 'ERROR' not in result.output
|
||||
# assert env_container_registry_server + "/" + module_name + ":0.0.1-" + get_platform_type() in content[
|
||||
# "modulesContent"]["$edgeAgent"]["properties.desired"]["modules"][module_name]["settings"]["image"]
|
||||
# assert module_name in get_all_docker_images()
|
||||
|
||||
|
||||
# @pytest.mark.skipif(get_docker_os_type() == 'windows', reason='Debugger does not support C# in windows container')
|
||||
|
|
Загрузка…
Ссылка в новой задаче