When using an installation profile, tests of contrib modules crash because testing always uses the standard profile, not commerce_kickstart. While this is a general problem with testing based on installation profiles, it is especially important for commerce_kickstart since the one of the goals of the installation is to provide a solid Drupal Commerce configuration in the face of many dependencies. Running the tests should provide proof that the installation runs correctly.
This is a duplicate of #1081220: Testing broken in the commercedev install profile but that issue is now closed since commercedev has become the Commerce Kickstart project. From original issue by bojanz:
1. Install commercedev.
2. Run tests.
3. Watch as they crash & burn.What happens is that testing always runs the "standard" profile.
In that case, the profiles/commercedev/modules/ directory isn't used, so the modules placed there aren't loaded, which of course breaks testing.We can specify $this->profile in each test.
Of course, that is not optimal since Commerce might not be in a install profile, and there might be 10 different commerce profiles, and testing should work everywhere.So I suggest moving modules from the profile directory to sites/all/modules. Not sure if that's frowned upon, but it's the only way to handle this cleanly.
All we'd need to do is fold commercedev.make into build.make.
Comments
Comment #1
keithm commentedI tried to modify commerce_kickstart.make by supplying a module 'destination' key (see #823896: Allow drush make files to use project destination) but it didn't change the module installation directories. There has been a lot of discussion on how/if this can be done in #913148: Please bring back install_path. At this point I'm not sure how exactly to change the module installation directory.
It's worth mentioning that all contrib module tests fail, regardless of location, when they have a dependency on a module that lives in profile/commerce_kickstart/modules.
Edit: I can verify that Commerce tests run correctly when the modules are moved to sites/all/modules :) I manually moved the directories and modified the paths in the system, registry, and registry_file tables to get this to go :(
Comment #1.0
keithm commentedUpdated issue summary.
Comment #2
rszrama commentedI just added a documentation area for Kickstart, so for now we'll just update our installation instructions to include moving modules out of profiles/commerce_kickstart/modules to sites/all/modules before installing. This is definitely a problem, esp. when you consider the module update status notification system completely ignores profiles/*/modules. :-/
Comment #3
miniwebs2 commentedI have worked out a way to have Commerce Kickstart and it's relevant modules available for updating when using the commerce-kickstart installation file. By using this file, all the required modules for Commerce to run, are included.
Extract the compressed file.
Once extracted, DO NOT YET INSTALL DRUPAL
Open up the "profiles" folder within the root folder, and select the "commerce-kickstart" profile - move that folder (or cut and paste) into "sites/all/modules".
This creates a "commerce-kickstart" module folder with a subset of all the required modules for commerce to run, under another 'modules' folder. Do not remove these modules from that folder. Any updating of those modules is recognised from within that folder, and also gets updated under that same folder.
Add a "tmp" folder to your root installation folder. (Solved a minor glitch I had whilst installing).
Now go ahead and install your drupal installation as normal selecting the Standard profile. (No kickstart installation profile will show up)
Once installed, head to "Modules" and manually enable all the Commerce modules as shown. You will be alerted to some module dependencies required - accept and continue as though modules are already installed.
Other contributed modules should then be installed as usual under sites/all/modules and updated from there.
Short story - keep all the commerce kickstart modules in the module folder UNDER the commerce-kickstart module. All others as normal in sites/all/modules.
This all worked for me and will be my preferred method of installing Commerce in the future.
One thing - A Product Display content type needs to be created - with a product reference field added.
Trust this helps others.
Comment #4
TimesArrow commentedkaybee, is your method to move files (and in general commerce kickstart's (CK) normal installation profile install) only for testing purposes? i've completely got CK running fine on my local. it seems ready for live/production on a host. so i did a backup_migrate on the local but backup_migrate does not pick up the images. (Edit April 11, 2012 - i removed a bunch of text here, i'm sure i was wrong, sorry.)
http://drupal.org/node/1291122
"You have many options as an advanced sitebuilder:
* Move modules into sites/all/modules or sites/all/modules/contrib: Although installation profiles build with the modules in the profiles directory, many developers want them in sites/all/modules. Before running the installation process, just move the modules from profiles/commerce_kickstart/modules into sites/all/modules with any tool you like. For example, mv profiles/commerce_kickstart/modules/* sites/all/modules/."
i can't find any explanation why you would want to do one way or the other.
i quickly got through lynda.com Drupal 7 and Drupal Commerce. i'm ready to go live with a basic cart but have no idea if my site will be getting proper security updates, proper backup_migrate... using the CK installation profile. or is CK only designed as a teaching tool. once we understand the commerce system are we supposed to jettison CK and start over installing Drupal 7 and load each module one at a time?
thanks!
Comment #5
rszrama commentedYep, Commerce Kickstart is only a launching point for a new site. When it comes to maintaining modules through upgrades, you don't have to update the installation profile at all any more - you would update the individual modules / themes on the site as you would with any other Drupal site not built from the profile.
Comment #6
miniwebs2 commented"kaybee, is your method to move files (and in general commerce kickstart's (CK) normal installation profile install) only for testing purposes?"
Having now worked through things even more, I don't believe I will use kickstart any more - it is a great starting point and got me 'into' commerce but am getting a grip on things now so will go back to installing commerce and all its dependencies as standard modules.
As rszrama says - "Yep, Commerce Kickstart is only a launching point for a new site."
Comment #7
damien tournoud commentedThis is a core bug. It has been fixed in 7.x-dev (and will appear in 7.13). See #911354: Tests in profiles/[name]/modules cannot be run and cannot use a different profile for running tests
Comment #7.0
damien tournoud commentedCopied contents from original Drupal Commerce issue queue.