plain-house-98998
12/07/2021, 2:55 PMdocker/sdk
ofc. At the moment, the issue is that same resources (DB, redis, queues) are being used by testing environment, so if we have a test that needs a fresh state of DB, we have a problem.
In Testify Environment.php APPLICATION_ENV is set to devtest
. There’s even a configuration file for this environment, but how to set it up? Basically there has to be a separate database (with a dedicated user), separate RMQ vhost, and likely redis db aswell.
That could be achieved by manually creating those resources, but is there any way to automate this?
The only idea that comes to my mind is to have a separate deploy.yml
file, but this has a great downside - everytime you wan to run tests, the environment would have to be rebuilt…
Any ideas welcome under the thread. Thanks ❤️little-umbrella-40933
12/07/2021, 4:47 PMtesting:
store: ...
little-umbrella-40933
12/07/2021, 4:48 PMlittle-umbrella-40933
12/07/2021, 4:52 PMwe have a test that needs a fresh state of DB
and why you would rely on some data present/missing in DB before test starts?
To make sure your test is isolated, you have to prepare the data you need by using TransactionHelper and DataBuilderslittle-umbrella-40933
12/07/2021, 4:55 PMplain-house-98998
12/07/2021, 6:12 PMplain-house-98998
12/07/2021, 6:12 PMlittle-umbrella-40933
12/08/2021, 9:46 AMlittle-umbrella-40933
12/08/2021, 9:46 AMadventurous-raincoat-66045
12/08/2021, 5:04 PMadventurous-raincoat-66045
12/08/2021, 5:28 PMlittle-umbrella-40933
12/08/2021, 6:11 PMgorgeous-school-55417
12/17/2021, 10:06 AM