Commit 107d85e2 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

more tries to fix CI unit tests

parent 161cf6b1
Pipeline #169762 failed with stage
in 9 minutes and 6 seconds
......@@ -17,23 +17,15 @@
QTEST_MAIN(KateSessionManagerTest)
void KateSessionManagerTest::initTestCase()
void KateSessionManagerTest::init()
{
m_tempdir = new QTemporaryDir;
QVERIFY(m_tempdir->isValid());
// we need an application object, as session loading will trigger modifications to that
static QCommandLineParser parser;
m_app = new KateApp(parser);
m_app->sessionManager()->activateAnonymousSession();
}
void KateSessionManagerTest::cleanupTestCase()
{
delete m_app;
}
void KateSessionManagerTest::init()
{
m_tempdir = new QTemporaryDir;
QVERIFY(m_tempdir->isValid());
m_manager = new KateSessionManager(this, m_tempdir->path());
}
......@@ -41,6 +33,7 @@ void KateSessionManagerTest::init()
void KateSessionManagerTest::cleanup()
{
delete m_manager;
delete m_app;
delete m_tempdir;
}
......
......@@ -16,8 +16,6 @@ class KateSessionManagerTest : public QObject
private Q_SLOTS:
void init();
void cleanup();
void initTestCase();
void cleanupTestCase();
void basic();
void activateNewNamedSession();
......
......@@ -16,23 +16,15 @@
QTEST_MAIN(KateSessionsActionTest)
void KateSessionsActionTest::initTestCase()
void KateSessionsActionTest::init()
{
m_tempdir = new QTemporaryDir;
QVERIFY(m_tempdir->isValid());
// we need an application object, as session loading will trigger modifications to that
static QCommandLineParser parser;
m_app = new KateApp(parser);
m_app->sessionManager()->activateAnonymousSession();
}
void KateSessionsActionTest::cleanupTestCase()
{
delete m_app;
}
void KateSessionsActionTest::init()
{
m_tempdir = new QTemporaryDir;
QVERIFY(m_tempdir->isValid());
m_manager = new KateSessionManager(this, m_tempdir->path());
m_ac = new KateSessionsAction(QStringLiteral("menu"), this, m_manager, false);
......@@ -42,6 +34,7 @@ void KateSessionsActionTest::cleanup()
{
delete m_ac;
delete m_manager;
delete m_app;
delete m_tempdir;
}
void KateSessionsActionTest::basic()
......
......@@ -20,8 +20,6 @@ private Q_SLOTS:
void init();
void cleanup();
void initTestCase();
void cleanupTestCase();
private:
class QTemporaryDir *m_tempdir;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment