It occurred to me that it would be great to have drush commands available to run the auto database loader, much as they are run from the URL path here. a drush.inc file would cover this. While I haven't written a drush extension before I can probably take a shot at it. Also this would be good for demos. Any demo site can just run that drush command on a cron to reset the demo site, every couple hours or whatever.
Also I ran into this when trying /ces/develop/script/fill :
Fatal error: Call to undefined function _ces_bank_create_default_exchange() in sites/all/modules/ces/ces_develop/fill.php on line 41
Maybe some more obvious info on what happens when you initially install, this development loader stuff etc would be good. I will try to put together some more on this.
Also you mentioned some of the test suite stuff doesn't work, that could go on this bug thread too.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | testcasefix-1998104-6.diff | 1.25 KB | hongpong |
Comments
Comment #1
esteve.badia commentedThe
fill.phpscript doesn't work. It got outdated. I think that the best is to directly remove the file. We have thedemo.phpscript that does this work of cleaning and filling the database with several accounts, offer ads and a pair of exchange groups and blog posts. And I think it more than sufficient.For the drush extension, it is absolutely a good idea, though it's not a priority right now for me. But if you want to do it, go ahead :-).
The test suite also got outdated when we changed the interface and the urls some months ago. I'm working on the test suite. I hope that today I'll be able to commit something in this direction.
Comment #2
esteve.badia commentedIn commit #112ca68 (and few subsequents):
- Deleted fill.php
- Updated ces_bank.test. Now the test passes. It only creates and activates a pair of exchanges.
The next steps in the test suite will be create accounts and transactions between them, both between accounts of the same exchange and between accounts of different exchanges. Still working on it!
Comment #3
esteve.badia commentedUps... for some reason some changes in this commit were deleted by other commits. Now the test fails. I'll try to see what happened.
Comment #4
esteve.badia commentedFixed in commit #b268ddb! It was myself trying to resolve merge conflicts... Now the (little) test pass again :)
Comment #5
esteve.badia commentedThe test starts to take shape. Now it creates a pair of exchanges, three users and make some transactions between them.
:-)
Perhaps it should be moved to parent ces module since it potentially depends on all modules so tests can be fully functional.
Comment #17
hongpong commentedOk here is a fix for the testcase file references. For me this usually works with Bank tests, most of interop, and all of Message and offerswants.
Comment #18
esteve.badia commentedHi @HongPong! What is this patch for? All the tests pass for me with the current branch code (without applying the patch). Doesn't it happen to you too?
Comment #19
hongpong commentedIn my case it could not include the pertinent files. I think this may be variable depending on the local environment. In my case it was the Acquia DevDesktop. I am not too familiar with how test suites include PHP files. I think maybe the statement activating token and oauth isn't necessary, but the require_once seemed to be needed on DevDesktop style environment.
Comment #20
esteve.badia commented@HongPong: Now that we've activated automated testing in drupal.org for this project we can see that the tests pass (except for the ces_interop module due to external library dependencies). So I'm inclined not to push your patch since it doesn't seem necessary, if you agree.
Comment #21
hongpong commentedOk, forget the patch for now. I will revisit it later and fiddle around with the local environment since it seems to work elsewhere.