Skip to content

Commit

Permalink
Merge pull request #29 from Jusuf95/utils_interface_validate
Browse files Browse the repository at this point in the history
Add test for validating Astarte interfaces using astartectl
  • Loading branch information
Annopaolo authored Dec 10, 2024
2 parents 57fbfac + dea5d64 commit 69403ae
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 69403ae

Please sign in to comment.