Split off the folder creation as this is causing all tests to fail for cmi upgrade patches.

Files: 
CommentFileSizeAuthor
#13 update-test-create.patch1.21 KBmarcingy
PASSED: [[SimpleTest]]: [MySQL] 35,019 pass(es). View
#5 drupal8.test-config.5.patch2.25 KBsun
PASSED: [[SimpleTest]]: [MySQL] 35,368 pass(es). View
simpletest-config.patch474 bytesmarcingy
PASSED: [[SimpleTest]]: [MySQL] 36,049 pass(es). View

Comments

marcingy’s picture

Priority: Normal » Major
marcingy’s picture

See http://drupal.org/node/1500312 and http://drupal.org/node/1496510#comment-5810546 - the second issue the patch above was added to make the tests pass.

Rok Žlender’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

sun’s picture

Title: Simple test does not create configuration folder causing test failures » SimpleTest does not create configuration folder causing test failures
Status: Fixed » Needs review
Issue tags: +Testing system
FileSize
2.25 KB
PASSED: [[SimpleTest]]: [MySQL] 35,368 pass(es). View

This change was wrong.

We don't want to automatically (re-)create the config directory on every single request.

SimpleTest actually attempts to create the config directory for the test site already, but apparently, it's entirely bogus, and if you happen to run a couple of tests in your D8 site, you will quickly see that a lot of config_23823t823t8ho directories are piling up in your public files directory.

Thus, the bug is that there's a directory name mismatch, and that needs to be fixed instead.

beejeebus’s picture

Status: Needs review » Reviewed & tested by the community

oh boy. yep, that fix is totally bogus. sun's fix looks good to me.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Ouch, committed/pushed the follow-up.

sun’s picture

While #5 is definitely more correct, something still bugs me, but I don't know what. If you have a clue, feel free to re-open this issue or link to a follow-up. Thanks :)

catch’s picture

It feels to me like since the config directory is within the files path, that we shouldn't really need special handling at all - i.e. the config system ought to be able to make the directory itself, but I'm assuming there's a good reason for that.

sun’s picture

Note, the config system never creates the config directory itself -- during a regular installation, it's the Drupal installer that creates the config directory.

Since the child site for a test run is not installed through the regular Drupal installer, this regular setup of the config directory doesn't happen either, so DrupalWebTestCase::setUp() creates it manually. This (and many similar issues) will go away once we've resolved #1215104: Use the non-interactive installer in WebTestBase::setUp() (which is still blocked on a range of dependencies currently)

catch’s picture

Right, I mean if the installer creates the files directory, since the config directory is inside that, then it seems possible for the config backend to handle the directory creation. However it's quite a long way down the list of things to worry about with the installer ;)

marcingy’s picture

Status: Fixed » Needs work

I am reopening this issue because we call

config_install_default_config();

but that does not actually create the simpletest directory so although we have a simpletest namespaced path we do not actually have a config dir to write too.

Found while looking at test failures for #1496534: Convert account settings to configuration system

marcingy’s picture

Status: Needs work » Needs review
FileSize
1.21 KB
PASSED: [[SimpleTest]]: [MySQL] 35,019 pass(es). View

The folder was not being created for update tests.

sun’s picture

Status: Needs review » Fixed

This code was heavily simplified in #1541958: Split setUp() into specific sub-methods very recently. Let's fix the upgrade path test setup over there.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Clarify what is causing issues