Calling Developers!
We are reenergizing our code contribution process! Learn More

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

Hello, with some recent updates for the spryker testify updates, there were changes made for the env

Options
UPWG9AYH2
UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

Hello,
with some recent updates for the spryker testify updates, there were changes made for the env variables

```

defined('SPRYKER_ACTIVE_STORES') || define('SPRYKER_ACTIVE_STORES', 'DE,AT');
```
It gets checked and set to default values DE,AT, which are not valid stores in our case

Where do i have to set SPRYKER_ACTIVE_STORES to make it work again? When i run a printenv on the testing container, it prints our store correctly (CN) … but in the stores php on the breakpoint, the default values DE, AT are fetched.

Any ideas?

Best regards and have a nice weekend.

Comments

  • U01BZ7Q3XRV
    U01BZ7Q3XRV Posts: 148 🧑🏻‍🚀 - Cadet
    Options

    you can set it in the deployment yaml configuration I think. So for local development it should be deploy.dev.yml file for example

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    Yes there its set correctly to only the one CN we have at the moment

  • U01BZ7Q3XRV
    U01BZ7Q3XRV Posts: 148 🧑🏻‍🚀 - Cadet
    Options

    oh ok, thats weird indeed

  • U01BZ7Q3XRV
    U01BZ7Q3XRV Posts: 148 🧑🏻‍🚀 - Cadet
    Options

    I mean you could probably just remove the fallback if it does not work for your setup, anyway. But then probably its empty...

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    hmmm ill try to bootstrap again … maybe thats needed with the testify update

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    edited April 2023
    Options

    No change … it seems SPRYKER_ACTIVE_STORES is not defined when running

    docker/sdk cli -t vendor/bin/codecept run -c

    But when i run

    docker/sdk cli -t printenv | grep SPRYKER_ACTIVE_STORES

    the result is

    SPRYKER_ACTIVE_STORES=CN

  • U01BZ7Q3XRV
    U01BZ7Q3XRV Posts: 148 🧑🏻‍🚀 - Cadet
    Options

    hm ok, would be interesting if that applies to other env vars as well. Otherwise you could probably set it by prepending the command with SPRYKER_ACTIVE_STORES=CN docker/sdk ...

  • U01BZ7Q3XRV
    U01BZ7Q3XRV Posts: 148 🧑🏻‍🚀 - Cadet
    Options

    but this does not help much if more env vars are not initalized correctly 😛

  • U01BZ7Q3XRV
    U01BZ7Q3XRV Posts: 148 🧑🏻‍🚀 - Cadet
    Options

    ah no, probably that also does not work if php does not load it correctly

  • U01BZ7Q3XRV
    U01BZ7Q3XRV Posts: 148 🧑🏻‍🚀 - Cadet
    Options

    I think we changed it in the store configuration to fallback to one of our default stores, if the env variable is not set. Another way might be this file here to set env variables for testing env? default.yml -> https://docs.spryker.com/docs/scos/dev/the-docker-sdk/202108.0/running-tests-with-the-docker-sdk.html#configure-codeception

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    edited May 2023
    Options

    It seems to be running a single modules testsuite does not work since the envs are not loaded with the corresponding codeception.yml
    As far as i understood the codeception.yml on root level does only aggregate any codeception.yml in tests/PyzTest// … but pointing to a specific codeception.yml won’t inlcude any env since its simply not configured into them …