Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenable skipped federated sharing integration test steps #24551

Closed
wants to merge 8 commits into from

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Dec 4, 2020

  • They currently run fine locally except for one that only succeedes on the first run (see FIXME)
  • Enabling APCu locally brings a huge speed boost, might make sense in general for the integration tests

@juliusknorr juliusknorr force-pushed the tests/integration-federated branch 2 times, most recently from 35d6eee to 16d2603 Compare December 7, 2020 10:57
@juliusknorr juliusknorr force-pushed the tests/integration-federated branch from e5a4ee2 to ba2fc1a Compare December 7, 2020 14:15
@juliusknorr
Copy link
Member Author

juliusknorr commented Dec 7, 2020

Turns out this requires php7.4 (for the tests) in order to be able to make requests to the same nextcloud instance

@juliusknorr juliusknorr force-pushed the tests/integration-federated branch 3 times, most recently from 641100e to 6874817 Compare December 29, 2020 13:08
@@ -30,7 +30,6 @@
* Trashbin functions
*/
trait Trashbin {
use WebDav;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure but it seems that this has become an issue when running the tests with php 7.4, i also have the following error locally with other integration tests without this change:

PHP Fatal error:  Trait 'WebDav' not found in /drone/src/build/integration/features/bootstrap/Trashbin.php on line 32

Removing it here seems to be fine since the trait is still being pulled in by the feature context themselve, however maybe someone can tell if that makes sense. Maybe @rullzer or @danxuliu ?

I feel the whole trait usage seems to be quite a mess and we should at some point rather just have multiple context classes that are applied to the test suites.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error also doesn't make much sense to me as the class loading should be handled as part of the behat loading of the PSR-0 namespace defined in

'': "%paths.base%/../features/bootstrap"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem seems to be caused by a circular dependency between the traits that, for some reason, works fine in PHP 7.3 and fails in PHP 7.4. I have no idea why 🤷 For more information please see #24895 (I have extracted it to its own pull request because it seemed worth of it ;-) ).

I feel the whole trait usage seems to be quite a mess and we should at some point rather just have multiple context classes that are applied to the test suites.

👍

.drone.yml Outdated
@@ -794,8 +794,9 @@ steps:
commands:
- git submodule update --init
- name: integration-federation_features
image: nextcloudci/integration-php7.3:integration-php7.3-2
image: nextcloudci/php7.4:php7.4-3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nextcloudci/integration-php7.4 Docker images are not available even if the tag is set. Maybe the Docker repositories for integration-php7.4 need to be explicitly created? @rullzer

@juliusknorr juliusknorr force-pushed the tests/integration-federated branch from 6874817 to d12daeb Compare December 30, 2020 16:41
@faily-bot
Copy link

faily-bot bot commented Dec 30, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 877: failure

nodb

Show full log
There were 5 errors:

1) OCA\DAV\Tests\Command\MoveCalendarTest::testMove
Error: Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found

/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:214

2) OCA\DAV\Tests\Command\MoveCalendarTest::testMoveWithDestinationNotPartOfGroup with data set #1 (false)
Error: Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found

/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:269

3) OCA\DAV\Tests\Command\MoveCalendarTest::testMoveWithDestinationPartOfGroup
Error: Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found

/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:312

4) OCA\DAV\Tests\Command\MoveCalendarTest::testMoveWithDestinationNotPartOfGroupAndForce
Error: Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found

/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:358

5) OCA\DAV\Tests\Command\MoveCalendarTest::testMoveWithCalendarAlreadySharedToDestination with data set #0 (true)
Error: Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found

/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:421

--

There were 11 warnings:

1) Test\AppFramework\Controller\AuthPublicShareControllerTest::testAuthenticateAuthenticated
Trying to configure method "isAuthenticated" which cannot be configured because it does not exist, has not been specified, is final, or is static

2) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #0 (35, 15, 2, false)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

3) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #1 (35, 45, 15, false)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

4) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #2 (35, 45, 5, true)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

5) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #3 (35, 45, 55, false)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

6) OCA\DAV\Tests\unit\CalDAV\CalendarTest::testConfidentialClassification with data set #0 (3, false)
No method rule is set

7) Warning
The data provider specified for ExpirationTest::testGetMaxAgeAsTimestamp is invalid.
PHPUnit\Util\Exception: Method timestampTestData does not exist

8) OCA\Settings\Tests\Mailer\NewUserMailHelperTest::testGenerateTemplateWithPasswordResetToken
Method getTime may not return value of type string, its return declaration is ": int"

9) OCA\TwoFactorBackupCodes\Tests\Unit\Listener\ActivityPublisherTest::testHandleCodesGeneratedEvent
Method publish may not return value of type Mock_IEvent_3564e23e, its return declaration is ": void"

10) OCA\UpdateNotification\Tests\Notification\BackgroundJobTest::testCreateNotifications with data set #1 ('app2', '1.0.1', '1.0.0', '1.0.0', true, array('user1'), array(array('user1')))
Method notify may not return value of type Mock_INotification_f73f1e7c, its return declaration is ": void"

11) OCA\UpdateNotification\Tests\Notification\BackgroundJobTest::testCreateNotifications with data set #2 ('app3', '1.0.1', false, false, true, array('user2', 'user3'), array(array('user2'), array('user3')))
Method notify may not return value of type Mock_INotification_f73f1e7c, its return declaration is ": void"

--

There were 6 failures:

1) OCA\DAV\Tests\Command\MoveCalendarTest::testWithBadUserOrigin with data set #0 (false, true)
Failed asserting that exception of type "Error" matches expected exception "InvalidArgumentException". Message was: "Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found" at
/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:121
.

2) OCA\DAV\Tests\Command\MoveCalendarTest::testWithBadUserOrigin with data set #1 (true, false)
Failed asserting that exception of type "Error" matches expected exception "InvalidArgumentException". Message was: "Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found" at
/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:121
.

3) OCA\DAV\Tests\Command\MoveCalendarTest::testMoveWithInexistantCalendar
Failed asserting that exception of type "Error" matches expected exception "InvalidArgumentException". Message was: "Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found" at
/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:146
.

4) OCA\DAV\Tests\Command\MoveCalendarTest::testMoveWithExistingDestinationCalendar
Failed asserting that exception of type "Error" matches expected exception "InvalidArgumentException". Message was: "Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found" at
/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:181
.

5) OCA\DAV\Tests\Command\MoveCalendarTest::testMoveWithDestinationNotPartOfGroup with data set #0 (true)
Failed asserting that exception of type "Error" matches expected exception "InvalidArgumentException". Message was: "Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found" at
/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:269
.

6) OCA\DAV\Tests\Command\MoveCalendarTest::testMoveWithCalendarAlreadySharedToDestination with data set #1 (false)
Failed asserting that exception of type "Error" matches expected exception "InvalidArgumentException". Message was: "Class 'Symfony\Component\Console\Output\TrimmedBufferOutput' not found" at
/drone/src/3rdparty/symfony/console/Style/SymfonyStyle.php:49
/drone/src/apps/dav/lib/Command/MoveCalendar.php:114
/drone/src/3rdparty/symfony/console/Command/Command.php:255
/drone/src/3rdparty/symfony/console/Tester/CommandTester.php:76
/drone/src/apps/dav/tests/unit/Command/MoveCalendarTest.php:421
.

mysql8.0-php7.4

integration-maintenance-mode

integration-ratelimiting

integration-carddav

integration-dav-v2

integration-checksums-v1

integration-external-storage

integration-provisioning-v1

integration-caldav

integration-favorites

integration-provisioning-v2

integration-sharees-features

integration-sharees-v2-features

integration-sharing-v1

integration-sharing-v1-part2

integration-sharing-v1-video-verification

integration-setup-features

integration-transfer-ownership-features

integration-ldap-openldap-features

integration-ldap-openldap-uid-features

integration-trashbin

integration-download

@juliusknorr juliusknorr force-pushed the tests/integration-federated branch from d12daeb to ee707f1 Compare January 15, 2021 07:54
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr force-pushed the tests/integration-federated branch from ee707f1 to b3df3a1 Compare August 20, 2021 15:21
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr
Copy link
Member Author

Closing due to lack of time.

@juliusknorr juliusknorr closed this Feb 1, 2023
@skjnldsv skjnldsv deleted the tests/integration-federated branch March 14, 2024 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants