Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCP-008-01 Receiver Status test suite #855

Draft
wants to merge 1 commit into
base: is-12
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions nmostesting/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,16 @@
}
}
},
"bcp-008-01": {
"repo": "bcp-008-01",
"versions": ["v1.0"],
"default_version": "v1.0",
"apis": {
"receivermonitor": {
"name": "Receiver Monitor"
}
}
},
"nmos-parameter-registers": {
"repo": "nmos-parameter-registers",
"versions": ["main"],
Expand Down
27 changes: 27 additions & 0 deletions nmostesting/NMOSTesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
from .suites import BCP00301Test
from .suites import BCP0060101Test
from .suites import BCP0060102Test
from .suites import BCP0080101Test


FLASK_APPS = []
Expand Down Expand Up @@ -429,6 +430,32 @@
}],
"class": BCP0060102Test.BCP0060102Test
},
"BCP-008-01": {
"name": "BCP-008-01 Receiver Status",
"specs": [{
"spec_key": "is-04",
"api_key": "node",
"disable_fields": ["urlpath"]
}, {
"spec_key": "is-12",
"api_key": "ncp",
"websocket": True,
}, {
"spec_key": "ms-05-02",
"api_key": "controlframework",
"disable_fields": ["host", "port", "urlpath"]
}, {
"spec_key": "bcp-008-01",
"api_key": "receivermonitor",
"disable_fields": ["host", "port", "urlpath"]
}],
"extra_specs": [{
"spec_key": "nmos-control-feature-sets",
"api_key": "featuresets"
}],
"class": BCP0080101Test.BCP0080101Test,
"urlpath": True
},
}


Expand Down
61 changes: 61 additions & 0 deletions nmostesting/suites/BCP0080101Test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright (C) 2025 Advanced Media Workflow Association
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from ..IS12Utils import IS12Utils

from ..GenericTest import GenericTest, NMOSTestException
from .MS0501Test import MS0501Test

NODE_API_KEY = "node"
CONTROL_API_KEY = "ncp"
MS05_API_KEY = "controlframework"


class BCP0080101Test(GenericTest):
"""
Runs Tests covering BCP-008-01
"""
def __init__(self, apis, **kwargs):
GenericTest.__init__(self, apis, **kwargs)
self.is12_utils = IS12Utils(apis)
# Instantiate MS0501Tests to access automatic tests
# Hmmm, should the automatic tests be factored into the utils to allow all
# MS-05 based test suites to access them?
self.ms0502Test = MS0501Test(apis, self.is12_utils, **kwargs)
self.node_url = apis[NODE_API_KEY]["url"]
self.ncp_url = apis[CONTROL_API_KEY]["url"]

def set_up_tests(self):
self.ms0502Test.set_up_tests()
self.is12_utils.open_ncp_websocket()
super().set_up_tests()

# Override basics to include the MS-05 auto tests
def basics(self):
results = super().basics()
try:
results += self.ms0502Test._auto_tests()
except NMOSTestException as e:
results.append(e.args[0])
except Exception as e:
results.append(self.uncaught_exception("auto_tests", e))
return results

def tear_down_tests(self):
# Clean up Websocket resources
self.is12_utils.close_ncp_websocket()

def test_01(self, test):
"""First Test!!!!!"""
return test.PASS()
Loading