Skip to content

[stable31] fix: Fix getting trusted server other than the first - #54381

Merged
kesselb merged 1 commit into
stable31from
backport/54371/stable31
Aug 28, 2025
Merged

[stable31] fix: Fix getting trusted server other than the first#54381
kesselb merged 1 commit into
stable31from
backport/54371/stable31

Conversation

@backportbot

Copy link
Copy Markdown

Backport of PR #54371

@nextcloud-botnextcloud-bot mentioned this pull request Aug 14, 2025
16 tasks
@st3iny

st3iny commented Aug 15, 2025

Copy link
Copy Markdown
Member

@danxuliu Test failure looks legit:

There was 1 error:
1) OCA\Federation\Tests\TrustedServersTest::testGetServer
ArgumentCountError: Too few arguments to function OCA\Federation\Tests\TrustedServersTest::testGetServer(), 0 passed in /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/Framework/TestCase.php on line 1617 and exactly 2 expected
/home/runner/work/server/server/apps/federation/tests/TrustedServersTest.php:198

"array_filter" preserves the keys, so after the trusted servers were
filtered "$server[0]" existed only if the server to get was the first
one in the original array.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu
danxuliuforce-pushed the backport/54371/stable31 branch from dfe75e2 to 9b691c2CompareAugust 28, 2025 06:32
@danxuliu

Copy link
Copy Markdown
Member

@danxuliu Test failure looks legit:

There was 1 error:
1) OCA\Federation\Tests\TrustedServersTest::testGetServer
ArgumentCountError: Too few arguments to function OCA\Federation\Tests\TrustedServersTest::testGetServer(), 0 passed in /home/runner/work/server/server/vendor-bin/phpunit/vendor/phpunit/phpunit/src/Framework/TestCase.php on line 1617 and exactly 2 expected
/home/runner/work/server/server/apps/federation/tests/TrustedServersTest.php:198

It was indeed. It was caused by a different syntax for PHPUnit data providers between stable31 and master. Fixed now.

Thanks for the ping and sorry for the delay!

@kesselb
kesselb merged commit ed69213 into stable31Aug 28, 2025
199 of 201 checks passed
@kesselb
kesselb deleted the backport/54371/stable31 branch August 28, 2025 07:40
@nextcloud-botnextcloud-bot mentioned this pull request Sep 4, 2025
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@st3iny@danxuliu@kesselb@Altahrim