Skip to content

Commit 8765d71

Browse files
authored
Lock .NET template version to 3.2.0 (#624)
* Lock .NET template version to 3.2.0 * Bump version * Update dotnet install cmd * Update dotnet new cmd args * Update dotnet new cmd args * Enable solution tests * Enable solution tests * Enable solution tests
1 parent 0d30f73 commit 8765d71

7 files changed

Lines changed: 46 additions & 41 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project since 0.82.0 will be documented in this file.
44

5+
## [3.3.8] - 2024-03-11
6+
7+
- Lock .NET Microsoft.Azure.IoT.Edge.Module version at 3.2.0
8+
59
## [3.3.7] - 2022-11-7
610

711
- Lock simulator version at 0.14.18

iotedgedev/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
__author__ = 'Microsoft Corporation'
44
__email__ = 'opencode@microsoft.com'
5-
__version__ = '3.3.7'
5+
__version__ = '3.3.8'
66
__AIkey__ = '95b20d64-f54f-4de3-8ad5-165a75a6c6fe'

iotedgedev/dotnet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def __init__(self, output, utility):
1111
self.utility.check_dependency(["dotnet", "--version"], "To add new C# modules and C# Functions modules, the .NET Core SDK")
1212

1313
def install_module_template(self):
14-
cmd = "dotnet new -i Microsoft.Azure.IoT.Edge.Module"
14+
# Use C# module template version 3.2.0; this is the last version before the upgrdae to .NET 7 which no longer uses dockerfiles
15+
cmd = "dotnet new -i Microsoft.Azure.IoT.Edge.Module::3.2.0 --force"
1516
self.output.header(cmd)
1617
self.utility.exe_proc(cmd.split())
1718

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 3.3.7
2+
current_version = 3.3.8
33
commit = True
44
tag = True
55

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
setup(
3535
name='iotedgedev',
36-
version='3.3.7',
36+
version='3.3.8',
3737
description='The Azure IoT Edge Dev Tool greatly simplifies the IoT Edge development process by automating many routine manual tasks, such as building, deploying, pushing modules and configuring the IoT Edge Runtime.',
3838
long_description='See https://github.com/azure/iotedgedev for usage instructions.',
3939
author='Microsoft Corporation',

tests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
__author__ = 'Microsoft Corporation'
44
__email__ = 'opencode@microsoft.com'
5-
__version__ = '3.3.7'
5+
__version__ = '3.3.8'

tests/test_iotedgedev_solution.py

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -260,21 +260,21 @@ def test_valid_env_device_connectionstring():
260260
assert connectionstring.device_id
261261

262262

263-
# def test_create_new_solution():
264-
# os.chdir(tests_dir)
265-
# clean_folder(test_solution_dir)
266-
#
267-
# for template in templates:
268-
# # Node.js modules is skipped on non-Windows for below known issue.
269-
# # https://github.com/Azure/iotedgedev/issues/312
270-
# # https://github.com/Azure/iotedgedev/issues/346
271-
# if (template == "nodejs") and (platform.system().lower() != 'windows'):
272-
# continue
273-
# else:
274-
# result = create_solution(template)
275-
# assert_solution_folder_structure(template)
276-
# assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output
277-
# clean_folder(test_solution_dir)
263+
def test_create_new_solution():
264+
os.chdir(tests_dir)
265+
clean_folder(test_solution_dir)
266+
267+
for template in templates:
268+
# Node.js modules is skipped on non-Windows for below known issue.
269+
# https://github.com/Azure/iotedgedev/issues/312
270+
# https://github.com/Azure/iotedgedev/issues/346
271+
if (template == "nodejs") and (platform.system().lower() != 'windows'):
272+
continue
273+
else:
274+
result = create_solution(template)
275+
assert_solution_folder_structure(template)
276+
assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output
277+
clean_folder(test_solution_dir)
278278

279279

280280
# def test_solution_push_with_default_platform(prepare_solution_with_env):
@@ -433,24 +433,24 @@ def test_gen_config_with_non_string_placeholder():
433433
assert "ERROR" not in result.output
434434

435435

436-
# @mock.patch.dict(os.environ, {"CONTAINER_REGISTRY_SERVER": "localhost:5000"})
437-
# @pytest.mark.skipif(get_docker_os_type() == 'windows', reason='windows container does not support local registry image')
438-
# def test_push_modules_to_local_registry(prepare_solution_with_env):
439-
# try:
440-
# module_name = "filtermodule"
441-
#
442-
# if module_name in get_all_docker_images():
443-
# remove_docker_image(module_name)
444-
#
445-
# result = runner_invoke(['push', '-P', get_platform_type()])
446-
#
447-
# assert 'ERROR' not in result.output
448-
# assert result.exit_code == 0
449-
# assert 'BUILD COMPLETE' in result.output
450-
# assert 'PUSH COMPLETE' in result.output
451-
# assert f"localhost:5000/{module_name in get_all_docker_images()}"
452-
# finally:
453-
# if "registry" in get_all_docker_containers():
454-
# remove_docker_container("registry")
455-
# if "registry" in get_all_docker_images():
456-
# remove_docker_image("registry:2")
436+
@mock.patch.dict(os.environ, {"CONTAINER_REGISTRY_SERVER": "localhost:5000"})
437+
@pytest.mark.skipif(get_docker_os_type() == 'windows', reason='windows container does not support local registry image')
438+
def test_push_modules_to_local_registry(prepare_solution_with_env):
439+
try:
440+
module_name = "filtermodule"
441+
442+
if module_name in get_all_docker_images():
443+
remove_docker_image(module_name)
444+
445+
result = runner_invoke(['push', '-P', get_platform_type()])
446+
447+
assert 'ERROR' not in result.output
448+
assert result.exit_code == 0
449+
assert 'BUILD COMPLETE' in result.output
450+
assert 'PUSH COMPLETE' in result.output
451+
assert f"localhost:5000/{module_name in get_all_docker_images()}"
452+
finally:
453+
if "registry" in get_all_docker_containers():
454+
remove_docker_container("registry")
455+
if "registry" in get_all_docker_images():
456+
remove_docker_image("registry:2")

0 commit comments

Comments
 (0)