•  
      request #13493 REST tests cannot be run without Internet connection
    Infos
    #13493
    Nicolas Terray (nterray)
    2019-06-27 17:02
    2019-06-15 00:09
    14300
    Details
    REST tests cannot be run without Internet connection

    When I disconnect wired and wireless connection on my dev environment, then the tests_rest_72 fails:

    PHPUnit 8.2.0 by Sebastian Bergmann and contributors.
    
    Runtime:       PHP 7.2.19
    Configuration: /usr/share/tuleap/tests/rest/phpunit.xml
    
    ...............................................................  63 / 674 (  9%)
    ............................................................... 126 / 674 ( 18%)
    ............................................................... 189 / 674 ( 28%)
    ....FSSSSSSSS..F....F.F.FE.F................................... 252 / 674 ( 37%)
    ............................................................... 315 / 674 ( 46%)
    ............................................................... 378 / 674 ( 56%)
    ............................................................... 441 / 674 ( 65%)
    ............................................................... 504 / 674 ( 74%)
    ............................................................... 567 / 674 ( 84%)
    ............................................................... 630 / 674 ( 93%)
    ............................................                    674 / 674 (100%)
    
    Time: 14.06 minutes, Memory: 28.00 MB
    
    There was 1 error:
    
    1) UsersTest::testInRestrictedForgeThatActiveProjectMemberIsMemberOfStaticUgroup
    Error while sending QUERY packet. PID=2693
    
    /usr/share/tuleap/tests/rest/lib/TuleapConfig.php:54
    /usr/share/tuleap/tests/rest/lib/TuleapConfig.php:59
    /usr/share/tuleap/tests/rest/tests/UsersTest.php:153
    
    --
    
    There were 6 failures:
    
    1) UserGroupTest::testPutUsersInProjectAdmins
    Failed asserting that actual size 3 matches expected size 2.
    
    /usr/share/tuleap/tests/rest/tests/UserGroupTest.php:305
    
    2) UserMembershipsTest::testGET
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
     Array (
         0 => 'site_active'
         1 => 'private-member_project_members'
    -    2 => 'private-member_project_admin'
    -    3 => 'private-member_project_members'
    -    4 => 'private-member_project_admin'
    +    2 => 'ug_102'
     )
    
    /usr/share/tuleap/tests/rest/tests/UserMembershipTest.php:48
    
    3) UsersTest::testGETMembershipBySelfReturnsUserGroups
    Failed asserting that actual size 5 matches expected size 3.
    
    /usr/share/tuleap/tests/rest/tests/UsersTest.php:85
    
    4) UsersTest::testUserCanSeeGroupOfAnotherUserIfSheHasDelegatedPermissions
    Failed asserting that actual size 5 matches expected size 3.
    
    /usr/share/tuleap/tests/rest/tests/UsersTest.php:106
    
    5) UsersTest::testSiteAdminCanSeeGroupOfAnyUser
    Failed asserting that actual size 5 matches expected size 3.
    
    /usr/share/tuleap/tests/rest/tests/UsersTest.php:148
    
    6) UsersTest::testInRestrictedForgeThatRestrictedNotProjectMemberIsOnlyMemberOfStaticUgroupInPublicInclRestricted
    Failed asserting that an array does not contain 'ug_104'.
    
    /usr/share/tuleap/tests/rest/tests/UsersTest.php:196
    
    --
    
    There were 8 skipped tests:
    
    1) UserGroupTest::testPutUsersInUserGroupWithUsername
    This test depends on "UserGroupTest::testPutUsersInProjectAdmins" to pass.
    
    2) UserGroupTest::testPutUsersInUserGroupWithEmail
    This test depends on "UserGroupTest::testPutUsersInUserGroupWithUsername" to pass.
    
    3) UserGroupTest::testPutUsersInUserGroupWithEmailMultipleUsers
    This test depends on "UserGroupTest::testPutUsersInUserGroupWithUsername" to pass.
    
    4) UserGroupTest::testPutUsersInUserGroup
    This test depends on "UserGroupTest::testPutUsersInUserGroupWithEmail" to pass.
    
    5) UserGroupTest::testPutUsersInUserGroupWithTwoDifferentIds
    This test depends on "UserGroupTest::testPutUsersInUserGroup" to pass.
    
    6) UserGroupTest::testPutUsersInUserGroupWithUnknownKey
    This test depends on "UserGroupTest::testPutUsersInUserGroup" to pass.
    
    7) UserGroupTest::testPutUsersInUserGroupWithNonAdminUser
    This test depends on "UserGroupTest::testPutUsersInUserGroup" to pass.
    
    8) UserGroupTest::testPutUsersInUserGroupWithNonValidRepresentation
    This test depends on "UserGroupTest::testPutUsersInUserGroup" to pass.
    
    ERRORS!
    Tests: 674, Assertions: 2461, Errors: 1, Failures: 6, Skipped: 8.
    Makefile:104: recipe for target 'tests_rest_72' failed
    make: *** [tests_rest_72] Error 2
    make tests_rest_72  0,13s user 0,12s system 0% cpu 14:43,26 total


    Furthermore it takes ages to complete. See time results with connection for comparison:

    make tests_rest_72  0,11s user 0,11s system 0% cpu 2:09,95 total

     

    Dev tools
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2019-06-27
    Attachments
    Empty
    References
    Referencing request #13493
    Referenced by request #13493

    Artifact Tracker v5

    Follow-ups