Skip to content

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

Open

Description

@MichalChomo

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

Activity

  1. garethsb commented on Feb 7, 2024

    @garethsb
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions