What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
hey everyone, I am currently switching an older Spryker project from a self-built docker base to be
hey everyone, I am currently switching an older Spryker project from a self-built docker base to be using the official docker/sdk from Spryker. I have now some problems understanding how docker/sdk handles the testing
environment... In our existing codebase, we switched APPLICATION_ENV between development
(for development) and devtest
(for running unit + integration tests), this included letting the devtest
run on a different database, queue virtual host, etc... As far as I can see, docker/sdk keeps the environment to e.g. docker.dev
and just enabled some kind of "testing" mode when running docker/sdk testing
... how exactly is that working, how can I import testdata there and isolate this from the normal docker.dev env (database content, etc)?
Comments
-
maybe I just misunderstand this
docker/sdk testing
, what is the purpose of it? I think I maybe just misunderstand it, and should be using a separate deploy.devtest.yml to run my tests0 -
Hello Rene,
If you want to use isolated env for testing, you can use different environment and different deploy.yml for sure.
However you can configure an environment that can be used for dev and testing at the same time. But all the data will be shared as you assumed. It would work if you have all tests isolated (or based on random, or cleanup after execution) and can be run multiple times in the same database.
docker/sdk testing
ordocker/sdk run -t
just runs webdriver and restart all apps withSPRYKER_TESTING_ENABLE=1
env variable that you can use in configuration.0 -
hey @ULYHPR789 thank you very much for the info!
Unfortunately, with our current setup, it is not possible to run the tests on the development database, as our tests assume a clean database, and for easy development we need an anonymized production-db copy.
Is there any other solution you could think of, besides using a different deploy.yml for testing? Because doing this would mean I would have to completely shutdown the environment, bootstrap it on the deploy.testing.yml file from new, start it, run the tests, and afterwards destroy it again... mhmm...
0 -
You can go alternative way if it is possible to use SPRYKER_TESTING_ENABLE and switch database/queue/redis database names.
However in this case you must create databases by additional scripts.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 930 Developer Corner
- 788 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random