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

Fix sharing settings unit tests #41637

Merged
merged 2 commits into from Nov 21, 2023
Merged

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Nov 21, 2023

Follow up of #41581

@artonge artonge requested a review from susnux November 21, 2023 13:13
@artonge artonge self-assigned this Nov 21, 2023
@artonge artonge added bug 3. to review Waiting for reviews php Pull requests that update Php code labels Nov 21, 2023
@artonge artonge added this to In progress in Files to vue via automation Nov 21, 2023
@artonge artonge added this to the Nextcloud 28 milestone Nov 21, 2023
@artonge artonge requested a review from come-nc November 21, 2023 13:13
@come-nc
Copy link
Contributor

come-nc commented Nov 21, 2023

453	There were 2 failures:
454	
455	1) OCA\Settings\Tests\Settings\Admin\SharingTest::testGetFormWithoutExcludedGroups
456	Failed asserting that two objects are equal.
457	--- Expected
458	+++ Actual
459	@@ @@
460	 OCP\AppFramework\Http\TemplateResponse Object (
461	     'templateName' => 'settings/admin/sharing'
462	     'params' => Array (
463	-        'sharingAppEnabled' => false
464	-        'allowGroupSharing' => 'yes'
465	-        'allowLinks' => 'yes'
466	-        'allowPublicUpload' => 'yes'
467	-        'allowResharing' => 'yes'
468	-        'allowShareDialogUserEnumeration' => 'yes'
469	-        'restrictUserEnumerationToGroup' => 'no'
470	-        'restrictUserEnumerationToPhone' => 'no'
471	-        'restrictUserEnumerationFullMatch' => 'yes'
472	-        'restrictUserEnumerationFullMatchUserId' => 'yes'
473	-        'restrictUserEnumerationFullMatchEmail' => 'yes'
474	-        'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no'
475	-        'enforceLinkPassword' => false
476	-        'onlyShareWithGroupMembers' => false
477	-        'shareAPIEnabled' => 'yes'
478	-        'shareDefaultExpireDateSet' => 'no'
479	-        'shareExpireAfterNDays' => '7'
480	-        'shareEnforceExpireDate' => 'no'
481	-        'shareExcludeGroups' => false
482	-        'shareExcludedGroupsList' => ''
483	-        'publicShareDisclaimerText' => 'Lorem ipsum'
484	-        'enableLinkPasswordByDefault' => 'yes'
485	-        'shareApiDefaultPermissions' => 31
486	-        'shareApiDefaultPermissionsCheckboxes' => false
487	-        'shareDefaultInternalExpireDateSet' => 'no'
488	-        'shareInternalExpireAfterNDays' => '7'
489	-        'shareInternalEnforceExpireDate' => 'no'
490	-        'shareDefaultRemoteExpireDateSet' => 'no'
491	-        'shareRemoteExpireAfterNDays' => '7'
492	-        'shareRemoteEnforceExpireDate' => 'no'
493	-        'allowLinksExcludeGroups' => ''
494	-        'passwordExcludedGroups' => ''
495	-        'passwordExcludedGroupsFeatureEnabled' => false
496	     )
497	     'renderAs' => ''
498	-    'appName' => 'settings'
499	+    'appName' => ''
500	     'headers' => Array ()
501	     'cookies' => Array ()
502	     'status' => 200
503	
504	/drone/src/apps/settings/tests/Settings/Admin/SharingTest.php:168
505	
506	2) OCA\Settings\Tests\Settings\Admin\SharingTest::testGetFormWithExcludedGroups
507	Failed asserting that two objects are equal.
508	--- Expected
509	+++ Actual
510	@@ @@
511	 OCP\AppFramework\Http\TemplateResponse Object (
512	     'templateName' => 'settings/admin/sharing'
513	     'params' => Array (
514	-        'sharingAppEnabled' => true
515	-        'allowGroupSharing' => 'yes'
516	-        'allowLinks' => 'yes'
517	-        'allowPublicUpload' => 'yes'
518	-        'allowResharing' => 'yes'
519	-        'allowShareDialogUserEnumeration' => 'yes'
520	-        'restrictUserEnumerationToGroup' => 'no'
521	-        'restrictUserEnumerationToPhone' => 'no'
522	-        'restrictUserEnumerationFullMatch' => 'yes'
523	-        'restrictUserEnumerationFullMatchUserId' => 'yes'
524	-        'restrictUserEnumerationFullMatchEmail' => 'yes'
525	-        'restrictUserEnumerationFullMatchIgnoreSecondDN' => 'no'
526	-        'enforceLinkPassword' => false
527	-        'onlyShareWithGroupMembers' => false
528	-        'shareAPIEnabled' => 'yes'
529	-        'shareDefaultExpireDateSet' => 'no'
530	-        'shareExpireAfterNDays' => '7'
531	-        'shareEnforceExpireDate' => 'no'
532	-        'shareExcludeGroups' => true
533	-        'shareExcludedGroupsList' => 'NoSharers|OtherNoSharers'
534	-        'publicShareDisclaimerText' => 'Lorem ipsum'
535	-        'enableLinkPasswordByDefault' => 'yes'
536	-        'shareApiDefaultPermissions' => 31
537	-        'shareApiDefaultPermissionsCheckboxes' => false
538	-        'shareDefaultInternalExpireDateSet' => 'no'
539	-        'shareInternalExpireAfterNDays' => '7'
540	-        'shareInternalEnforceExpireDate' => 'no'
541	-        'shareDefaultRemoteExpireDateSet' => 'no'
542	-        'shareRemoteExpireAfterNDays' => '7'
543	-        'shareRemoteEnforceExpireDate' => 'no'
544	-        'allowLinksExcludeGroups' => ''
545	-        'passwordExcludedGroups' => ''
546	-        'passwordExcludedGroupsFeatureEnabled' => false
547	     )
548	     'renderAs' => ''
549	-    'appName' => 'settings'
550	+    'appName' => ''
551	     'headers' => Array ()
552	     'cookies' => Array ()
553	     'status' => 200
554	
555	/drone/src/apps/settings/tests/Settings/Admin/SharingTest.php:250

@artonge artonge force-pushed the artonge/fix/unit_test_sharing_settings branch from 489ac5f to 104ec04 Compare November 21, 2023 14:20
@artonge artonge force-pushed the artonge/fix/unit_test_sharing_settings branch from 104ec04 to eee4c3f Compare November 21, 2023 15:03
@artonge artonge force-pushed the artonge/fix/unit_test_sharing_settings branch from eee4c3f to 9838bb8 Compare November 21, 2023 15:18
@come-nc
Copy link
Contributor

come-nc commented Nov 21, 2023

PHP Fatal error:  Uncaught ParseError: syntax error, unexpected token "->", expecting identifier or variable or "{" or "$" in /drone/src/apps/settings/tests/Settings/Admin/SharingTest.php:129

🤦

Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge force-pushed the artonge/fix/unit_test_sharing_settings branch from 9838bb8 to 7984b80 Compare November 21, 2023 16:32
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc requested a review from susnux November 21, 2023 16:52
@come-nc
Copy link
Contributor

come-nc commented Nov 21, 2023

Fixed it until it passed locally 😥

@artonge artonge merged commit 7c6ee7e into master Nov 21, 2023
50 checks passed
Files to vue automation moved this from In progress to Done Nov 21, 2023
@artonge artonge deleted the artonge/fix/unit_test_sharing_settings branch November 21, 2023 17:52
@blizzz blizzz mentioned this pull request Nov 22, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug php Pull requests that update Php code
Projects
Files to vue
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants