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

(Untitled)

UQ4B55JLV
UQ4B55JLV Posts: 8 πŸ§‘πŸ»β€πŸš€ - Cadet

Comments

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    I think it doesn't do the full bootstrapping when running single tests.
    Does it work if you run all tests?

    docker/sdk testing codecept run
    
  • UQ4B55JLV
    UQ4B55JLV Posts: 8 πŸ§‘πŸ»β€πŸš€ - Cadet

    I have these errors:

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    These values are populated by other config_default...php files. Seems that it doesn't happen in your case.
    What's your APPLICATION_ENV when tests are executed?

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    It will execute config_default-[APPLICATION_ENV].php on startup. Once you know what APPLICATION_ENV you're on, you can check if the propel config values are set inside this file.

  • UQ4B55JLV
    UQ4B55JLV Posts: 8 πŸ§‘πŸ»β€πŸš€ - Cadet

    APPLICATION_ENV is docker.test and the file config_deafult-docker.test.php does not exist. Is there a sample config file for testing?

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    Please check config_default.php. It should be loaded before any other config files.

  • UQ4B55JLV
    UQ4B55JLV Posts: 8 πŸ§‘πŸ»β€πŸš€ - Cadet

    I have config from config_default-docker.php and this call works now
    docker/sdk testing codecept run -c tests/PyzTest/Zed/Product/codeception.yml

    But this one does not
    docker/sdk testing codecept run

    Error:
    In ErrorHandler.php line 83:
    session_set_save_handler(): Cannot change save handler when headers already sent

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    That sounds familiar somehow...
    Go to tests/_bootstrap.php and add this to the very end of the file.

    ob_start();
    

    Let's see if it helps.

  • UQ4B55JLV
    UQ4B55JLV Posts: 8 πŸ§‘πŸ»β€πŸš€ - Cadet

    I have this error: β€žDeprecated: The resolvable class cache is enabled but was not generated. in /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/ClassResolver/ResolvableCache/CacheReader/CacheReaderPhp.php on line 33"

    That’s why this error is displayed: β€œsession_set_save_handler(): Cannot change save handler when headers already sent”.

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    We had that, too, but I don't remember anymore.
    Please check your config files. In my project, I'm having

    $config[KernelConstants::RESOLVABLE_CLASS_NAMES_CACHE_ENABLED] = false;
    

    in config_default-devtest.php.
    Hoping that this will fix it.

  • UQ4B55JLV
    UQ4B55JLV Posts: 8 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thanks, the tests are now running, but many are failing. I think it may still be problems in the config.

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    Might be, I'm sure you'll find out.
    πŸ‘