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.

CommentFileSizeAuthor
#17 testcasefix-1998104-6.diff1.25 KBhongpong

Comments

esteve.badia’s picture

The fill.php script doesn't work. It got outdated. I think that the best is to directly remove the file. We have the demo.php script 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.

esteve.badia’s picture

In 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!

esteve.badia’s picture

Ups... for some reason some changes in this commit were deleted by other commits. Now the test fails. I'll try to see what happened.

esteve.badia’s picture

Fixed in commit #b268ddb! It was myself trying to resolve merge conflicts... Now the (little) test pass again :)

esteve.badia’s picture

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

  • Commit 112ca68 on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • Commit 112ca68 on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications, 2215167-interop by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications, 2215167-interop by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications, 2215167-interop by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • Commit 112ca68 on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications, 2215167-interop, 2215169-interop by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications, 2215167-interop, 2215169-interop by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications, 2215167-interop, 2215169-interop by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • Commit 112ca68 on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications, 2215167-interop, 2215169-interop, 2215171-interop by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications, 2215167-interop, 2215169-interop, 2215171-interop by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on master, 7.x-1.x, 2216627-docs, 1916476-Import_data_from_CES, 1401884-Notifications, 2215167-interop, 2215169-interop, 2215171-interop by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • Commit 112ca68 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • Commit 112ca68 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications, 1401884-Notifications_b by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications, 1401884-Notifications_b by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications, 1401884-Notifications_b by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • Commit 112ca68 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications, 1401884-Notifications_b, 2271149-opentransact by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications, 1401884-Notifications_b, 2271149-opentransact by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications, 1401884-Notifications_b, 2271149-opentransact by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • Commit 112ca68 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications, 1401884-Notifications_b, 2271149-opentransact, 2271629-Comments_in_offers by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications, 1401884-Notifications_b, 2271149-opentransact, 2271629-Comments_in_offers by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications, 1401884-Notifications_b, 2271149-opentransact, 2271629-Comments_in_offers by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • Commit 112ca68 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications_b, 2271149-opentransact, 2271629-Comments_in_offers, 1996122-Module_code_documentation by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications_b, 2271149-opentransact, 2271629-Comments_in_offers, 1996122-Module_code_documentation by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications_b, 2271149-opentransact, 2271629-Comments_in_offers, 1996122-Module_code_documentation by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • Commit 112ca68 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications_b, 2271149-opentransact, 1996122-Module_code_documentation, 2283781-accept-payments by esteve.badia:
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • Commit b268ddb on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications_b, 2271149-opentransact, 1996122-Module_code_documentation, 2283781-accept-payments by esteve.badia:
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • Commit bea34a8 on 7.x-1.x, 2215167-interop, 2215169-interop, 2215171-interop, 1401884-Notifications_b, 2271149-opentransact, 1996122-Module_code_documentation, 2283781-accept-payments by esteve.badia:
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    

  • esteve.badia committed 112ca68 on 2303099-cenip
    Issue #1998104 by esteve.badia: Re-started test file. Deleted fill.php...
  • esteve.badia committed b268ddb on 2303099-cenip
    Issue #1998104 by esteve.badia: Added some coded lost in commit #0565c38...
  • esteve.badia committed bea34a8 on 2303099-cenip
    Issue #1998104 by esteve.badia: Tests and bugfixes.
    
hongpong’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.25 KB

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

esteve.badia’s picture

Hi @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?

hongpong’s picture

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

esteve.badia’s picture

Version: » 7.x-1.x-dev

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

hongpong’s picture

Ok, forget the patch for now. I will revisit it later and fiddle around with the local environment since it seems to work elsewhere.