Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The Telepresence test suite could run Telepresence many fewer times #400
The Telepresence test suite has approximately 30 tests and it is run around three times per platform (once for each of inject-tcp, vpn-tcp, and container). Most tests involve running the
Measurements suggest that this setup may take around 8 seconds. If we can convince some number of the tests to share one
One pattern we've identified in the test suite is this:
One improvement would be to merge the logic in
This idea can hopefully be generalized, merging most or all of the necessary logic which must run in the Telepresence "context" (where
To aid in developing further tests and debugging failures, rather than simply and straight-forwardly combining all of these programs into one, we want to instead to change the factoring somewhat.
Instead of taking actions and checking the validity of the results, we want the program which runs in the Telepresence context to gather data and expose it to the pytest process. The data can be gathered up and then test methods can inspect the data and make assertions about it. This allows us to maintain a useful separation of the testing logic into different test methods while accomplishing the goal of reducing the per-test overhead.