eager-lamp-6898602/03/2022, 3:19 PM
to create environments for running integration tests. We might want to move to using Kubernetes pods in future. In both cases we are running the tests from a container which should be created by the test framework. This is different from the way pants runs tests - they are executed in the same environment as pants.
Ideally I would like
to do the following:
1. Set up a docker-compose test environment. The necessary data for it should be collected from the target.
2. Build the necessary pex files for the test
3. Copy the pex files to a container in the environment
4. Execute the test from the environment and collect the results
5. Tear-down the test envrionment
Do you think that something like this is possible to achieve? I'm open to writing plugins as long as I don't need to rewrite the whole pytest rule to get this thing to work.
./pants test ./test/my-integration-test.py
happy-kitchen-8948202/03/2022, 3:27 PM
eager-lamp-6898602/03/2022, 3:44 PM
which creates a test environment for each test which contains the whole repository in a container. Then it runs
in the created environment. This works, but it is very slow.
./pants test ...
happy-kitchen-8948202/03/2022, 5:39 PM
eager-lamp-6898602/03/2022, 5:41 PM
curved-television-656802/03/2022, 7:52 PM
happy-kitchen-8948202/03/2022, 9:45 PM
inside the environment? Or is it important for each test to have a separate standalone environment?
eager-lamp-6898602/04/2022, 9:32 AM
happy-kitchen-8948202/04/2022, 10:22 PM
able-school-9202712/21/2023, 2:03 PM