Global MySQL server

Currently, when using a MySQL container, the startup times for the container are very long. This becomes problematic when features and scenarios require unique databases and a new server is spun up for each one.

Ideally, a singleton container should be started and each Mysql instance corresponds to one (and only one) database served by it. The Mysql class will then no longer subclass Container.

Edit: (9-03-2023) Additionally, triggered by an environment variable flag, the service container should be left running after tests have completed and re-used by subsequent runs, using labels for discovery. This is now planned in #32

Changes to functions:

  • Add a function class constructor for idempotently starting the MySQL container and returning a reference to it
    Edit: (9-03-2023) A class constructor is cleaner IMO

Changes to Mysql:

  • Remove all Container methods and base class
  • Update @property methods returning CLI, to point them at the MySQL container
  • Update get_location method to return port details of the MySQL container
Edited by Dom Sekotill