Merge pull request #5206 from nextcloud/ci/doNotOverrideConfigurationFile

Ci/do not override configuration file
This commit is contained in:
Matthieu Gallien 2022-11-25 10:37:21 +01:00 committed by GitHub
commit 30589c7686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,21 +5,24 @@
* *
*/ */
#include <account.h> #include "configfile.h"
#include <accountstate.h> #include "account.h"
#include <accountmanager.h> #include "accountstate.h"
#include <common/vfs.h> #include "accountmanager.h"
#include <common/shellextensionutils.h> #include "common/vfs.h"
#include "common/shellextensionutils.h"
#include "config.h" #include "config.h"
#include <folderman.h> #include "folderman.h"
#include <libsync/vfs/cfapi/shellext/configvfscfapishellext.h> #include "libsync/vfs/cfapi/shellext/configvfscfapishellext.h"
#include <ocssharejob.h> #include "ocssharejob.h"
#include <shellextensionsserver.h> #include "shellextensionsserver.h"
#include <syncengine.h> #include "syncengine.h"
#include "syncenginetestutils.h" #include "syncenginetestutils.h"
#include "testhelper.h" #include "testhelper.h"
#include <vfs/cfapi/shellext/customstateprovideripc.h> #include "vfs/cfapi/shellext/customstateprovideripc.h"
#include <vfs/cfapi/shellext/thumbnailprovideripc.h> #include "vfs/cfapi/shellext/thumbnailprovideripc.h"
#include <QTemporaryDir>
#include <QtTest> #include <QtTest>
#include <QImage> #include <QImage>
#include <QPainter> #include <QPainter>
@ -165,6 +168,9 @@ public:
private slots: private slots:
void initTestCase() void initTestCase()
{ {
QTemporaryDir dir;
ConfigFile::setConfDir(dir.path());
VfsShellExtensions::ThumbnailProviderIpc::overrideServerName = VfsShellExtensions::serverNameForApplicationNameDefault(); VfsShellExtensions::ThumbnailProviderIpc::overrideServerName = VfsShellExtensions::serverNameForApplicationNameDefault();
VfsShellExtensions::CustomStateProviderIpc::overrideServerName = VfsShellExtensions::serverNameForApplicationNameDefault(); VfsShellExtensions::CustomStateProviderIpc::overrideServerName = VfsShellExtensions::serverNameForApplicationNameDefault();
@ -258,6 +264,9 @@ private slots:
void testRequestThumbnails() void testRequestThumbnails()
{ {
QTemporaryDir dir;
ConfigFile::setConfDir(dir.path());
FolderMan *folderman = FolderMan::instance(); FolderMan *folderman = FolderMan::instance();
QVERIFY(folderman); QVERIFY(folderman);
auto folder = FolderMan::instance()->folderForPath(fakeFolder.localPath()); auto folder = FolderMan::instance()->folderForPath(fakeFolder.localPath());
@ -338,6 +347,9 @@ private slots:
void testRequestCustomStates() void testRequestCustomStates()
{ {
QTemporaryDir dir;
ConfigFile::setConfDir(dir.path());
FolderMan *folderman = FolderMan::instance(); FolderMan *folderman = FolderMan::instance();
QVERIFY(folderman); QVERIFY(folderman);
auto folder = FolderMan::instance()->folderForPath(fakeFolder.localPath()); auto folder = FolderMan::instance()->folderForPath(fakeFolder.localPath());
@ -469,6 +481,9 @@ private slots:
void cleanupTestCase() void cleanupTestCase()
{ {
QTemporaryDir dir;
ConfigFile::setConfDir(dir.path());
VfsShellExtensions::ThumbnailProviderIpc::overrideServerName.clear(); VfsShellExtensions::ThumbnailProviderIpc::overrideServerName.clear();
if (auto folder = FolderMan::instance()->folderForPath(fakeFolder.localPath())) { if (auto folder = FolderMan::instance()->folderForPath(fakeFolder.localPath())) {