Expand test suite

Context

Currently tests miss out on some behaviour, so I propose to expand it in two main areas

  • Some coverage is missing
    • In the _app folder some non-cli parts should be tested, such as the bots (buildbox, dummy and host), and perhaps the yaml parser.
    • More tests for the bots side, currently there's only some test for the Worker and Device classes, but not the BotSession or BotInterface classes.
    • We don't currently test the scheduler directly, so might want to test the more complicated parts of that.
  • Some more integration and system tests, there's currently only one in the gitlab ci, and it would be good to be able to test this before pushing.
    • Buildstream has a cli class in its test utils, something along those lines could be useful for using full components of buildgrid.
    • We could test various scenarios such as bots/server/cas going down and check we get the desired behaviour. These types of tests will take longer but can be marked with pytest as integration tests, so that devs can avoid running them.

Task Description

Discuss the above and then implement it.

  • Add unit testing for the Scheduler to cover gaps not caught in the integration tests
  • Add some integration tests to exercise the monitoring codepaths
  • Add some end-to-end tests that can be run locally

Acceptance Criteria

Expansions to test suite merged in.

Edited by Adam Coldrick