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

[IS-05-01] test_24 IndexError: list index out of range #843

Open
MichalChomo opened this issue Feb 7, 2024 · 1 comment
Open

[IS-05-01] test_24 IndexError: list index out of range #843

MichalChomo opened this issue Feb 7, 2024 · 1 comment

Comments

@MichalChomo
Copy link

Traceback:

  File "/home/nmos-testing/nmostesting/GenericTest.py", line 155, in execute_test
    self.result.append(method(test))
  File "/home/nmos-testing/nmostesting/suites/IS0501Test.py", line 572, in test_24
    valid2, response2 = self.is05_utils.check_change_transport_param("receiver", self.receivers,
  File "/home/nmos-testing/nmostesting/IS05Utils.py", line 418, in check_change_transport_param
    expected = paramValues[count]
IndexError: list index out of range

I think this is because our implementation currently returns empty list for /x-nmos/connection/v1.1/single/receivers/{receiverId}/constraints/, therefore:

  1. generate_destination_ports returns []
  2. generate_changeable_param returns []
  3. check_change_transport_param tries to get element at index 0, but the list is empty
@garethsb
Copy link
Contributor

garethsb commented Feb 7, 2024

Thanks for the report and investigation.

An empty array at /constraints is a valid response per the schema but not actually permitted by the spec which says there must be an array entry corresponding to each leg in the transport_params at /staged and /active.

That said, the testing tool should tell you that, not raise an IndexError. I'm sure you're right that a fix is possible in the functions you mention, to output a proper error for the implementation instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants