CRM-12547 failing api tests #3

    Details

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

      Description

      Api tests got broken on master a while back. Most are fixed but 10 remain. I think they stem from 3 pieces of work so am logging 3 tickets so the relevant people can fix them & they don't stay broken. This is ticket 2

      https://test.civicrm.org/job/CiviCRM-master-git/LABEL=debian6,SUITE=api_v3_AllTests/19/testReport/

      >>> api_v3_MailingContactTest.testMailingContactDelivered 0.18 sec 9
      >>> api_v3_SyntaxConformanceAllEntitiesTest::testSimple_get.testSimple_get with data set #35 0.34 sec 9
      >>> api_v3_SyntaxConformanceAllEntitiesTest::testAcceptsOnlyID_get.testAcceptsOnlyID_get with data set #35 0.34 sec 9
      >>> api_v3_SyntaxConformanceAllEntitiesTest::testCreateSingleValueAlter.testCreateSingleValueAlter with data set #8

      These relate to the mailing contact api. The last 3 are syntax conformance & this API may need to be skipped as it is a pseudo-api - which works to make the structure look as if it were structured in one table instead of several (which it probably should be).

        Attachments

          Issue Links

            Activity

            [CRM-12547] failing api tests #3
            Eileen McNaughton added a comment -

            This is for test breakage caused by CRM-12357. Most of the breakage is in syntaxConformance tests. Some of these can't be made to pass because the API is effectively a pretence that a mailingcontact table exists, but others can be fixed

            Eileen McNaughton added a comment -

            I have commited a PR against this

            fix includes -

            • using spec function to provide documentation, enforce required fields, provide default, enforce options
            • using standard api function to process 'limit', 'sort' etc
            • skipping checks for getByID because in this area the api cannot be made standard
              NOTE that the default limit has been set to the api default (25). Making
              this non standard for a particular use-case doesn't make sense.

            Preferred calling method is
            $params['options' => array('sort' => 'contact_id DESC', 'limit' => 50,
            'offset' => 200)

              People

              • Assignee:
                Donald A. Lobo
                Reporter:
                Eileen McNaughton

                Dates

                • Created:
                  Updated:
                  Resolved: