Skip to content

Commit

Permalink
Add tests for Astarte interface validation
Browse files Browse the repository at this point in the history
- Add test to validate Astarte interfaces using astartectl

Signed-off-by: Jusuf <jusuf.avdic@secomind.com>
  • Loading branch information
Jusuf95 committed Dec 10, 2024
1 parent 57fbfac commit dea5d64
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/utils/test_utils_interface.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SPDX-FileCopyrightText: 2024 SECO Mind Srl
#
# SPDX-License-Identifier: Apache-2.0


import subprocess
import os


def test_utils_interface_validate():
interface = "test.astarte-platform.draft.interfaces.Install"

interface_path = os.path.realpath(
os.path.join("tests", "realm_management", "test_interfaces", f"{interface}.json")
)

arg_list = [
"astartectl",
"utils",
"interfaces",
"validate",
interface_path,
]

sample_data_result = subprocess.run(arg_list, capture_output=True, text=True)

assert sample_data_result.returncode == 0

0 comments on commit dea5d64

Please sign in to comment.