Backport #12181

This should fix the stable7 unit tests again since the last CI update.
Merge pull request #12223 from owncloud/fix-unit-tests-s7

Backport #12181