Skip to content

[MCCS-2057] Refactor functional tests

Tom Moynihan requested to merge mccs-2057 into main

This MR refactors the functional tests to do a couple of things:

  • Use MccsController.On() to turn on the deployment, this speed about the tests by about 2x, and means our tiles get to synchronised without needing to go down to MccsTile directly.
  • Add a library of generic fixtures/bdd Given steps for use in tests. These steps are as follows:
    • Given an MCCS deployment which is ONLINE and ON. This calls MccsController.On and sets the adminmode of all devices to ONLINE
    • Given stations ci-1, ci-2 etc which populates a fixture station_labels for use in the test. This is a required step in the Gherkin.
    • Given {count} {station_agnostic_device}, e.g Given 2 MccsSubarray, this gets a proxy to MccsSubarray 1 and 2, checks they are online and on, then returns them to the subarrays fixture for use in testing.
    • Given {count} {station_caring_device} on all stations, e.g Given 2 MccsTile on all stations, same as above but returns a dictionary using the station labels defined by Given stations ci-1, ci-2 etc of the form {station_label : list[devices_of_that_type_on_that_station]}
  • The fixtures are all initialised to empty for population by the BDD steps, a fixture all_devices has been made which returns a list of proxies to all the devices defined in the Gherkin, is in use in the wait_for_lrcs_to_finish fixture.

I didn't touch the On/Off tests as those should be using the lower level device commands, as they are testing MccsController.On/Off

Note there is an intermittent failure with the beamformer running or not. This is being tracked in MCCS-2008, and won't be fixed in this MR

Edited by Tom Moynihan

Merge request reports