Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11328

unit test truncate for domains causing failures

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: Test suite
    • Labels:
      None

      Description

      Pradeep - I have committed the change discussed in this email & am putting the ticket to you to check based on Joe's comments. Please close if you are happy with it.

      Pradeep,
      Could you review this? If moving this to teardown works, I imagine it is because the two domains are being created in setup. Could you ensure that the contact and email for the domain is being setup correctly?
      Thanks,
      Joe

      Joe Murray, PhD

      On Thu, Nov 15, 2012 at 9:37 PM, Eileen McNaughton wrote:
      Hi Joe,

      I’ve just realised that a bunch of unit tests are failing because the civicrm_domain table is empty – which because a change merged in from civicrm_accounts causes it to be truncated each time the tests run

      CiviUnitTestCase::setup
      $tablesToTruncate = array('civicrm_domain', 'civicrm_contact')

      Do you know why that is happening? The default unit test data set should have 2 domains but when others get added in testing they are not easily deleted – so I’m guessing this was maybe an overkill approach for that problem?

      Unfortunately the joys of svn merge make it hard to find the actual commit (at least starting from trunk);

      Moving the whole truncate statement to teardown seems to be enough to make the tests work again

      Eileen

        Attachments

          Activity

            People

            • Assignee:
              pradeep.nayak Pradeep Nayak
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: