Create a Mock Database for testing the workers
To implement the submission/monitoring worker split, we either wait for the KubernetesExecutor to finish, or we use a mock. A mock will also allow us to replicate observed abnormal situations in reprocible tests.
Implement the Database API as a mock. Make an abstract superclass and let the current Database derive from it. Then create a MockDatabase in the tests/. The DB is pretty simple, yet, so the mock should support all public database methods for adding, removing, updating, runs (it's just a run DB). As we have only a single index maybe just using a simple dictionary will be sufficient to model the DB.
Edited by Philip Reiner Kensche