Drupal Association members fund grants that make connections all over the world.
seems to have broken deployment. is one bug, there are lots of others out there we don't know about yet.
Because the process of setting up a dev/live deployment scenario is extremely time-consuming and error-prone to do manually, it's not shocking to me that people don't do it often when testing CMI patches. It is, however, the entire point of that feature, so we should make sure that it's always working even with various refactorings we do.
So we need a test that does (at least) something roughly like this:
- Set up prod
- Set up dev based on prod
- Change site slogan on dev
- Export config from dev
- Import config on prod
- Verify that site slogan and only site slogan appears on the synchronize list
- Import the changes on prod
- Verify that prod's synchronize list is now empty.
- Verify site slogan changed on prod
- Also do the same with something fancier, like make a content type with a field it on dev
...Because those are what I tried to do in front of an audience of 70 people or so today at PNWDS and it failed. Hard. :)
chx says the following could work for writing the test (there's some trickiness because test methods aren't guaranteed to run in any particular order, and order matters here):
1) Add a sort($class_methods) to TestBase::run based on a property
2) Write a test method that exports
3) At the end of the test do $this->export = file_get_contents('exported_tarball'); (to hold the contents between testruns so they dont' get deleted)
4) write a test method which is alphabetically later which imports (testExport, testImport will actually do)
Each testX method automatically spins up a new Drupal site, so the dev/prod would easily be covered.
PASSED: [[SimpleTest]]: [MySQL] 58,542 pass(es). View
FAILED: [[SimpleTest]]: [MySQL] 58,637 pass(es), 0 fail(s), and 2 exception(s). View
PASSED: [[SimpleTest]]: [MySQL] 58,568 pass(es). View