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..

Hi all... Topic: Demo-shop b2b testing database When i start to test functions connecting to the d

Posts: 12 šŸ§‘šŸ»ā€šŸš€ - Cadet
edited November 2022 in Help

Hi all...

Topic: Demo-shop b2b testing database

When i start to test functions connecting to the database is refused.
What is totally clear, cause testing environment credentials are used.
But the database trying to reach is not created yet.
When is the "testing" databse created or how could i create the testing database?

Thx in advance, Oli

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Posts: 29 šŸ§‘šŸ»ā€šŸš€ - Cadet

    @UP951K4L9 Someone who has the same problem like us!

  • Posts: 29 šŸ§‘šŸ»ā€šŸš€ - Cadet

    I know only to rebuild the project for test environment. i really hate that approach because maybe you need the automated test while developing and dont want to wait 20minutes for the project to rebuild overtime.

  • Posts: 12 šŸ§‘šŸ»ā€šŸš€ - Cadet

    I am already starting my containers in testing mode. But no testing database is created

  • Posts: 9 šŸ§‘šŸ»ā€šŸš€ - Cadet

    Iā€™m having the same issue, any help would be appreciated. seems like there should be a step or console command somewhere to populate the test database?

  • Posts: 12 šŸ§‘šŸ»ā€šŸš€ - Cadet

    At least some documentation or advice in the docs how to accomplish that, at the best some console command.

  • Posts: 60 šŸ§‘šŸ»ā€šŸš€ - Cadet

    got the same problem
    did you find out anything?
    also read up the documentation in testing mode and so on, but didn't find any hint on how the test database is created

    how to you rebuild the test env? bootstrap from which deploy.yml? or do you use the install with testing.yml?!

  • Posts: 60 šŸ§‘šŸ»ā€šŸš€ - Cadet

    docker/sdk cli -t vendor/bin/install --recipe=testing

    this aborts because it cannot reach the db...

  • Posts: 78 šŸ§‘šŸ»ā€šŸš€ - Cadet

    For the purpose of anybody who sees this, try

    docker/sdk console -x -t 
    codecept run -g MyModuleTestGroup
    
  • Posts: 60 šŸ§‘šŸ»ā€šŸš€ - Cadet

    I don't get it, how will this install the testing db?

  • Posts: 78 šŸ§‘šŸ»ā€šŸš€ - Cadet

    For testing with sprykers b2c DB or one that you have spun up?

  • Posts: 78 šŸ§‘šŸ»ā€šŸš€ - Cadet

    If you want to use another DB to test with you can just use

          - Db:
             dsn: 'mysql:host=localhost;dbname=testdb'
             user: 'root'
             password: ''
    
  • Posts: 78 šŸ§‘šŸ»ā€šŸš€ - Cadet

    Inside the codeception.yml

  • Posts: 78 šŸ§‘šŸ»ā€šŸš€ - Cadet

    But there's some kind of issue using the -c variable in the command. And it has to be run via the cli

  • Posts: 60 šŸ§‘šŸ»ā€šŸš€ - Cadet

    the testing db is never created within testing mode without creating a separate project

  • Posts: 60 šŸ§‘šŸ»ā€šŸš€ - Cadet

    but testing mode tries to connect to a testing db which is not there

  • Posts: 78 šŸ§‘šŸ»ā€šŸš€ - Cadet

    Is there an error message I can look at?

  • Posts: 78 šŸ§‘šŸ»ā€šŸš€ - Cadet

    I'm not sure Ive seen this example although I've so far ran into many more

  • Posts: 60 šŸ§‘šŸ»ā€šŸš€ - Cadet

    sorry I am working with a different project now that does not use the sdk

  • Posts: 78 šŸ§‘šŸ»ā€šŸš€ - Cadet

    Awesome hope its going well!

Welcome!

It looks like you're new here. Sign in or register to get started.