summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <dvratil@kde.org>2016-09-18 14:40:30 (GMT)
committerDaniel Vrátil <dvratil@kde.org>2016-09-18 14:40:43 (GMT)
commit5a9b8c55157862fc3d44c328674a302356a3bdc2 (patch)
treed2a7fa0005db20d00753f10b54a4f983bddab24f
parent78de12de99964b8ea2cc8016d303921e4b7b196e (diff)
Modernize Akonadi unittestenv
Add MySQL and PSQL configs, update config files
-rw-r--r--messagecomposer/autotests/unittestenv/config-mysql-fs.xml10
-rw-r--r--messagecomposer/autotests/unittestenv/config-postgresql-fs.xml10
-rw-r--r--messagecomposer/autotests/unittestenv/config-sqlite-db.xml5
-rw-r--r--messagecomposer/autotests/unittestenv/config.xml8
-rw-r--r--messagecomposer/autotests/unittestenv/xdgconfig-mysql.fs/akonadi/akonadiserverrc6
-rw-r--r--messagecomposer/autotests/unittestenv/xdgconfig-postgresql.fs/akonadi/akonadiserverrc10
-rw-r--r--messagecomposer/autotests/unittestenv/xdgconfig/akonadi-firstrunrc (renamed from messageviewer/autotests/unittestenv/kdehome/share/config/akonadi-firstrunrc)0
-rw-r--r--messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_0rc4
-rw-r--r--messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_1rc3
-rw-r--r--messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_2rc3
-rw-r--r--messagecomposer/autotests/unittestenv/xdglocal/testdata-res1.xml78
-rw-r--r--messagecomposer/autotests/unittestenv/xdglocal/testdata-res2.xml6
-rw-r--r--messagecomposer/autotests/unittestenv/xdglocal/testdata-res3.xml4
-rw-r--r--messagecomposer/autotests/unittestenv/xdglocal/testdata.xml82
-rw-r--r--messageviewer/autotests/unittestenv/config-mysql-fs.xml10
-rw-r--r--messageviewer/autotests/unittestenv/config-postgresql-fs.xml10
-rw-r--r--messageviewer/autotests/unittestenv/config-sqlite-db.xml5
-rw-r--r--messageviewer/autotests/unittestenv/config.xml8
-rw-r--r--messageviewer/autotests/unittestenv/xdgconfig-mysql.fs/akonadi/akonadiserverrc6
-rw-r--r--messageviewer/autotests/unittestenv/xdgconfig-postgresql.fs/akonadi/akonadiserverrc10
-rw-r--r--messageviewer/autotests/unittestenv/xdgconfig/akonadi-firstrunrc (renamed from messagecomposer/autotests/unittestenv/kdehome/share/config/akonadi-firstrunrc)0
-rw-r--r--messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_0rc4
-rw-r--r--messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_1rc3
-rw-r--r--messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_2rc3
-rw-r--r--messageviewer/autotests/unittestenv/xdglocal/testdata-res1.xml78
-rw-r--r--messageviewer/autotests/unittestenv/xdglocal/testdata-res2.xml6
-rw-r--r--messageviewer/autotests/unittestenv/xdglocal/testdata-res3.xml4
-rw-r--r--messageviewer/autotests/unittestenv/xdglocal/testdata.xml82
28 files changed, 456 insertions, 2 deletions
diff --git a/messagecomposer/autotests/unittestenv/config-mysql-fs.xml b/messagecomposer/autotests/unittestenv/config-mysql-fs.xml
new file mode 100644
index 0000000..7454278
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/config-mysql-fs.xml
@@ -0,0 +1,10 @@
+<config>
+ <confighome>xdgconfig-mysql.fs</confighome>
+ <datahome>xdglocal</datahome>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
+ <envvar name="TESTRUNNER_DB_ENVIRONMENT">mysql</envvar>
+ <envvar name="AKONADI_OVERRIDE_SEARCHPLUGIN">akonadi_test_searchplugin</envvar>
+</config>
diff --git a/messagecomposer/autotests/unittestenv/config-postgresql-fs.xml b/messagecomposer/autotests/unittestenv/config-postgresql-fs.xml
new file mode 100644
index 0000000..8b628b8
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/config-postgresql-fs.xml
@@ -0,0 +1,10 @@
+<config>
+ <confighome>xdgconfig-postgresql.fs</confighome>
+ <datahome>xdglocal</datahome>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
+ <envvar name="TESTRUNNER_DB_ENVIRONMENT">postgresql</envvar>
+ <envvar name="AKONADI_OVERRIDE_SEARCHPLUGIN">akonadi_test_searchplugin</envvar>
+</config>
diff --git a/messagecomposer/autotests/unittestenv/config-sqlite-db.xml b/messagecomposer/autotests/unittestenv/config-sqlite-db.xml
index 860ba45..8f793b4 100644
--- a/messagecomposer/autotests/unittestenv/config-sqlite-db.xml
+++ b/messagecomposer/autotests/unittestenv/config-sqlite-db.xml
@@ -1,7 +1,10 @@
<config>
- <kdehome>kdehome</kdehome>
<confighome>xdgconfig-sqlite.db</confighome>
<datahome>xdglocal</datahome>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
<envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
<envvar name="TESTRUNNER_DB_ENVIRONMENT">sqlite</envvar>
+ <envvar name="AKONADI_OVERRIDE_SEARCHPLUGIN">akonadi_test_searchplugin</envvar>
</config>
diff --git a/messagecomposer/autotests/unittestenv/config.xml b/messagecomposer/autotests/unittestenv/config.xml
new file mode 100644
index 0000000..98c2dfa
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/config.xml
@@ -0,0 +1,8 @@
+<config>
+ <confighome>xdgconfig</confighome>
+ <datahome>xdglocal</datahome>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
+</config>
diff --git a/messagecomposer/autotests/unittestenv/xdgconfig-mysql.fs/akonadi/akonadiserverrc b/messagecomposer/autotests/unittestenv/xdgconfig-mysql.fs/akonadi/akonadiserverrc
new file mode 100644
index 0000000..a7bb0c2
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/xdgconfig-mysql.fs/akonadi/akonadiserverrc
@@ -0,0 +1,6 @@
+[%General]
+SizeThreshold=0
+ExternalPayload=true
+
+[Search]
+Manager=Dummy
diff --git a/messagecomposer/autotests/unittestenv/xdgconfig-postgresql.fs/akonadi/akonadiserverrc b/messagecomposer/autotests/unittestenv/xdgconfig-postgresql.fs/akonadi/akonadiserverrc
new file mode 100644
index 0000000..8333c73
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/xdgconfig-postgresql.fs/akonadi/akonadiserverrc
@@ -0,0 +1,10 @@
+[%General]
+Driver=QPSQL
+SizeThreshold=0
+ExternalPayload=true
+
+[Search]
+Manager=Dummy
+
+[QPSQL]
+StartServer=true
diff --git a/messageviewer/autotests/unittestenv/kdehome/share/config/akonadi-firstrunrc b/messagecomposer/autotests/unittestenv/xdgconfig/akonadi-firstrunrc
index c5e90d8..c5e90d8 100644
--- a/messageviewer/autotests/unittestenv/kdehome/share/config/akonadi-firstrunrc
+++ b/messagecomposer/autotests/unittestenv/xdgconfig/akonadi-firstrunrc
diff --git a/messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_0rc b/messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_0rc
new file mode 100644
index 0000000..0d9e3cf
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_0rc
@@ -0,0 +1,4 @@
+[General]
+DataFile[$e]=$XDG_DATA_HOME/testdata-res1.xml
+FileWatchingEnabled=false
+
diff --git a/messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_1rc b/messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_1rc
new file mode 100644
index 0000000..87df3c6
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_1rc
@@ -0,0 +1,3 @@
+[General]
+DataFile[$e]=$XDG_DATA_HOME/testdata-res2.xml
+FileWatchingEnabled=false
diff --git a/messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_2rc b/messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_2rc
new file mode 100644
index 0000000..274fbfc
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_2rc
@@ -0,0 +1,3 @@
+[General]
+DataFile[$e]=$XDG_DATA_HOME/testdata-res3.xml
+FileWatchingEnabled=false
diff --git a/messagecomposer/autotests/unittestenv/xdglocal/testdata-res1.xml b/messagecomposer/autotests/unittestenv/xdglocal/testdata-res1.xml
new file mode 100644
index 0000000..db51834
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/xdglocal/testdata-res1.xml
@@ -0,0 +1,78 @@
+<knut>
+ <collection rid="6" name="res1" content="inode/directory">
+ <collection rid="10" name="foo" content="inode/directory,application/octet-stream,text/directory,text/calendar,message/rfc822">
+ <collection rid="2" name="bar" content="inode/directory">
+ <collection rid="3" name="bla" content="inode/directory">
+ </collection>
+ </collection>
+ <collection rid="4" name="bla" content="inode/directory">
+ </collection>
+ <item rid="A" mimetype="application/octet-stream">
+ <payload>testmailbody</payload>
+ <attribute type="HEAD">From: &lt;test@user.tst&gt;</attribute>
+ <flag>\SEEN</flag>
+ <flag>\FLAGGED</flag>
+ <flag>\DRAFT</flag>
+ </item>
+ <item rid="B" mimetype="application/octet-stream">
+ <payload>testmailbody1</payload>
+ <attribute type="HEAD">From: &lt;test1@user.tst&gt;</attribute>
+ <flag>\FLAGGED</flag>
+ <tag>tagrid</tag>
+ </item>
+ <item rid="C" mimetype="application/octet-stream">
+ <payload>testmailbody2</payload>
+ <attribute type="HEAD">From: &lt;test2@user.tst&gt;</attribute>
+ </item>
+ <item rid="D" mimetype="application/octet-stream">
+ <payload>testmailbody3</payload>
+ <attribute type="HEAD">From: &lt;test3@user.tst&gt;</attribute>
+ </item>
+ <item rid="E" mimetype="application/octet-stream">
+ <payload>testmailbody4</payload>
+ <attribute type="HEAD">From: &lt;test4@user.tst&gt;</attribute>
+ </item>
+ <item rid="F" mimetype="application/octet-stream">
+ <payload>testmailbody5</payload>
+ <attribute type="HEAD">From: &lt;test5@user.tst&gt;</attribute>
+ </item>
+ <item rid="G" mimetype="application/octet-stream">
+ <payload>testmailbody6</payload>
+ <attribute type="HEAD">From: &lt;test6@user.tst&gt;</attribute>
+ </item>
+ <item rid="H" mimetype="application/octet-stream">
+ <payload>testmailbody7</payload>
+ <attribute type="HEAD">From: &lt;test7@user.tst&gt;</attribute>
+ </item>
+ <item rid="I" mimetype="application/octet-stream">
+ <payload>testmailbody8</payload>
+ <attribute type="HEAD">From: &lt;test8@user.tst&gt;</attribute>
+ </item>
+ <item rid="J" mimetype="application/octet-stream">
+ <payload>testmailbody9</payload>
+ <attribute type="HEAD">From: &lt;test9@user.tst&gt;</attribute>
+ </item>
+ <item rid="K" mimetype="application/octet-stream">
+ <payload>testmailbody10</payload>
+ <attribute type="HEAD">From: &lt;test10@user.tst&gt;</attribute>
+ </item>
+ <item rid="L" mimetype="application/octet-stream">
+ <payload>testmailbody11</payload>
+ <attribute type="HEAD">From: &lt;test11@user.tst&gt;</attribute>
+ </item>
+ <item rid="M" mimetype="application/octet-stream">
+ <payload>testmailbody12</payload>
+ <attribute type="HEAD">From: &lt;test12@user.tst&gt;</attribute>
+ </item>
+ <item rid="N" mimetype="application/octet-stream">
+ <payload>testmailbody13</payload>
+ <attribute type="HEAD">From: &lt;test13@user.tst&gt;</attribute>
+ </item>
+ <item rid="O" mimetype="application/octet-stream">
+ <payload>testmailbody14</payload>
+ <attribute type="HEAD">From: &lt;test14@user.tst&gt;</attribute>
+ </item>
+ </collection>
+ </collection>
+ <tag name="name" type="type" gid="taggid" rid="tagrid"></tag>
+</knut>
diff --git a/messagecomposer/autotests/unittestenv/xdglocal/testdata-res2.xml b/messagecomposer/autotests/unittestenv/xdglocal/testdata-res2.xml
new file mode 100644
index 0000000..b12f3b3
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/xdglocal/testdata-res2.xml
@@ -0,0 +1,6 @@
+<knut>
+ <collection rid="7" name="res2" content="inode/directory">
+ <collection rid="5" name="foo2" content=""/>
+ <collection rid="9" name="space folder" content=""/>
+ </collection>
+</knut>
diff --git a/messagecomposer/autotests/unittestenv/xdglocal/testdata-res3.xml b/messagecomposer/autotests/unittestenv/xdglocal/testdata-res3.xml
new file mode 100644
index 0000000..0c3b7a8
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/xdglocal/testdata-res3.xml
@@ -0,0 +1,4 @@
+<knut>
+ <collection rid="8" name="res3" content="inode/directory,application/octet-stream">
+ </collection>
+</knut>
diff --git a/messagecomposer/autotests/unittestenv/xdglocal/testdata.xml b/messagecomposer/autotests/unittestenv/xdglocal/testdata.xml
new file mode 100644
index 0000000..06559c2
--- /dev/null
+++ b/messagecomposer/autotests/unittestenv/xdglocal/testdata.xml
@@ -0,0 +1,82 @@
+<knut>
+ <collection rid="6" name="res1" content="inode/directory">
+ <collection rid="10" name="foo" content="inode/directory,application/octet-stream,text/directory,text/calendar">
+ <collection rid="2" name="bar" content="inode/directory">
+ <collection rid="3" name="bla" content="inode/directory">
+ </collection>
+ </collection>
+ <collection rid="4" name="bla" content="inode/directory">
+ </collection>
+ <item rid="A" mimetype="application/octet-stream">
+ <payload>testmailbody</payload>
+ <attribute type="HEAD">From: &lt;test@user.tst&gt;</attribute>
+ <flag>\SEEN</flag>
+ <flag>\FLAGGED</flag>
+ <flag>\DRAFT</flag>
+ </item>
+ <item rid="B" mimetype="application/octet-stream">
+ <payload>testmailbody1</payload>
+ <attribute type="HEAD">From: &lt;test1@user.tst&gt;</attribute>
+ <flag>\FLAGGED</flag>
+ </item>
+ <item rid="C" mimetype="application/octet-stream">
+ <payload>testmailbody2</payload>
+ <attribute type="HEAD">From: &lt;test2@user.tst&gt;</attribute>
+ </item>
+ <item rid="D" mimetype="application/octet-stream">
+ <payload>testmailbody3</payload>
+ <attribute type="HEAD">From: &lt;test3@user.tst&gt;</attribute>
+ </item>
+ <item rid="E" mimetype="application/octet-stream">
+ <payload>testmailbody4</payload>
+ <attribute type="HEAD">From: &lt;test4@user.tst&gt;</attribute>
+ </item>
+ <item rid="F" mimetype="application/octet-stream">
+ <payload>testmailbody5</payload>
+ <attribute type="HEAD">From: &lt;test5@user.tst&gt;</attribute>
+ </item>
+ <item rid="G" mimetype="application/octet-stream">
+ <payload>testmailbody6</payload>
+ <attribute type="HEAD">From: &lt;test6@user.tst&gt;</attribute>
+ </item>
+ <item rid="H" mimetype="application/octet-stream">
+ <payload>testmailbody7</payload>
+ <attribute type="HEAD">From: &lt;test7@user.tst&gt;</attribute>
+ </item>
+ <item rid="I" mimetype="application/octet-stream">
+ <payload>testmailbody8</payload>
+ <attribute type="HEAD">From: &lt;test8@user.tst&gt;</attribute>
+ </item>
+ <item rid="J" mimetype="application/octet-stream">
+ <payload>testmailbody9</payload>
+ <attribute type="HEAD">From: &lt;test9@user.tst&gt;</attribute>
+ </item>
+ <item rid="K" mimetype="application/octet-stream">
+ <payload>testmailbody10</payload>
+ <attribute type="HEAD">From: &lt;test10@user.tst&gt;</attribute>
+ </item>
+ <item rid="L" mimetype="application/octet-stream">
+ <payload>testmailbody11</payload>
+ <attribute type="HEAD">From: &lt;test11@user.tst&gt;</attribute>
+ </item>
+ <item rid="M" mimetype="application/octet-stream">
+ <payload>testmailbody12</payload>
+ <attribute type="HEAD">From: &lt;test12@user.tst&gt;</attribute>
+ </item>
+ <item rid="N" mimetype="application/octet-stream">
+ <payload>testmailbody13</payload>
+ <attribute type="HEAD">From: &lt;test13@user.tst&gt;</attribute>
+ </item>
+ <item rid="O" mimetype="application/octet-stream">
+ <payload>testmailbody14</payload>
+ <attribute type="HEAD">From: &lt;test14@user.tst&gt;</attribute>
+ </item>
+ </collection>
+ </collection>
+ <collection rid="7" name="res2" content="inode/directory">
+ <collection rid="5" name="foo2" content=""/>
+ <collection rid="9" name="space folder" content=""/>
+ </collection>
+ <collection rid="8" name="res3" content="inode/directory,application/octet-stream">
+ </collection>
+</knut>
diff --git a/messageviewer/autotests/unittestenv/config-mysql-fs.xml b/messageviewer/autotests/unittestenv/config-mysql-fs.xml
new file mode 100644
index 0000000..7454278
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/config-mysql-fs.xml
@@ -0,0 +1,10 @@
+<config>
+ <confighome>xdgconfig-mysql.fs</confighome>
+ <datahome>xdglocal</datahome>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
+ <envvar name="TESTRUNNER_DB_ENVIRONMENT">mysql</envvar>
+ <envvar name="AKONADI_OVERRIDE_SEARCHPLUGIN">akonadi_test_searchplugin</envvar>
+</config>
diff --git a/messageviewer/autotests/unittestenv/config-postgresql-fs.xml b/messageviewer/autotests/unittestenv/config-postgresql-fs.xml
new file mode 100644
index 0000000..8b628b8
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/config-postgresql-fs.xml
@@ -0,0 +1,10 @@
+<config>
+ <confighome>xdgconfig-postgresql.fs</confighome>
+ <datahome>xdglocal</datahome>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
+ <envvar name="TESTRUNNER_DB_ENVIRONMENT">postgresql</envvar>
+ <envvar name="AKONADI_OVERRIDE_SEARCHPLUGIN">akonadi_test_searchplugin</envvar>
+</config>
diff --git a/messageviewer/autotests/unittestenv/config-sqlite-db.xml b/messageviewer/autotests/unittestenv/config-sqlite-db.xml
index 860ba45..8f793b4 100644
--- a/messageviewer/autotests/unittestenv/config-sqlite-db.xml
+++ b/messageviewer/autotests/unittestenv/config-sqlite-db.xml
@@ -1,7 +1,10 @@
<config>
- <kdehome>kdehome</kdehome>
<confighome>xdgconfig-sqlite.db</confighome>
<datahome>xdglocal</datahome>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
<envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
<envvar name="TESTRUNNER_DB_ENVIRONMENT">sqlite</envvar>
+ <envvar name="AKONADI_OVERRIDE_SEARCHPLUGIN">akonadi_test_searchplugin</envvar>
</config>
diff --git a/messageviewer/autotests/unittestenv/config.xml b/messageviewer/autotests/unittestenv/config.xml
new file mode 100644
index 0000000..98c2dfa
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/config.xml
@@ -0,0 +1,8 @@
+<config>
+ <confighome>xdgconfig</confighome>
+ <datahome>xdglocal</datahome>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <agent synchronize="true">akonadi_knut_resource</agent>
+ <envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
+</config>
diff --git a/messageviewer/autotests/unittestenv/xdgconfig-mysql.fs/akonadi/akonadiserverrc b/messageviewer/autotests/unittestenv/xdgconfig-mysql.fs/akonadi/akonadiserverrc
new file mode 100644
index 0000000..a7bb0c2
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/xdgconfig-mysql.fs/akonadi/akonadiserverrc
@@ -0,0 +1,6 @@
+[%General]
+SizeThreshold=0
+ExternalPayload=true
+
+[Search]
+Manager=Dummy
diff --git a/messageviewer/autotests/unittestenv/xdgconfig-postgresql.fs/akonadi/akonadiserverrc b/messageviewer/autotests/unittestenv/xdgconfig-postgresql.fs/akonadi/akonadiserverrc
new file mode 100644
index 0000000..8333c73
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/xdgconfig-postgresql.fs/akonadi/akonadiserverrc
@@ -0,0 +1,10 @@
+[%General]
+Driver=QPSQL
+SizeThreshold=0
+ExternalPayload=true
+
+[Search]
+Manager=Dummy
+
+[QPSQL]
+StartServer=true
diff --git a/messagecomposer/autotests/unittestenv/kdehome/share/config/akonadi-firstrunrc b/messageviewer/autotests/unittestenv/xdgconfig/akonadi-firstrunrc
index c5e90d8..c5e90d8 100644
--- a/messagecomposer/autotests/unittestenv/kdehome/share/config/akonadi-firstrunrc
+++ b/messageviewer/autotests/unittestenv/xdgconfig/akonadi-firstrunrc
diff --git a/messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_0rc b/messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_0rc
new file mode 100644
index 0000000..0d9e3cf
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_0rc
@@ -0,0 +1,4 @@
+[General]
+DataFile[$e]=$XDG_DATA_HOME/testdata-res1.xml
+FileWatchingEnabled=false
+
diff --git a/messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_1rc b/messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_1rc
new file mode 100644
index 0000000..87df3c6
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_1rc
@@ -0,0 +1,3 @@
+[General]
+DataFile[$e]=$XDG_DATA_HOME/testdata-res2.xml
+FileWatchingEnabled=false
diff --git a/messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_2rc b/messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_2rc
new file mode 100644
index 0000000..274fbfc
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/xdgconfig/akonadi_knut_resource_2rc
@@ -0,0 +1,3 @@
+[General]
+DataFile[$e]=$XDG_DATA_HOME/testdata-res3.xml
+FileWatchingEnabled=false
diff --git a/messageviewer/autotests/unittestenv/xdglocal/testdata-res1.xml b/messageviewer/autotests/unittestenv/xdglocal/testdata-res1.xml
new file mode 100644
index 0000000..db51834
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/xdglocal/testdata-res1.xml
@@ -0,0 +1,78 @@
+<knut>
+ <collection rid="6" name="res1" content="inode/directory">
+ <collection rid="10" name="foo" content="inode/directory,application/octet-stream,text/directory,text/calendar,message/rfc822">
+ <collection rid="2" name="bar" content="inode/directory">
+ <collection rid="3" name="bla" content="inode/directory">
+ </collection>
+ </collection>
+ <collection rid="4" name="bla" content="inode/directory">
+ </collection>
+ <item rid="A" mimetype="application/octet-stream">
+ <payload>testmailbody</payload>
+ <attribute type="HEAD">From: &lt;test@user.tst&gt;</attribute>
+ <flag>\SEEN</flag>
+ <flag>\FLAGGED</flag>
+ <flag>\DRAFT</flag>
+ </item>
+ <item rid="B" mimetype="application/octet-stream">
+ <payload>testmailbody1</payload>
+ <attribute type="HEAD">From: &lt;test1@user.tst&gt;</attribute>
+ <flag>\FLAGGED</flag>
+ <tag>tagrid</tag>
+ </item>
+ <item rid="C" mimetype="application/octet-stream">
+ <payload>testmailbody2</payload>
+ <attribute type="HEAD">From: &lt;test2@user.tst&gt;</attribute>
+ </item>
+ <item rid="D" mimetype="application/octet-stream">
+ <payload>testmailbody3</payload>
+ <attribute type="HEAD">From: &lt;test3@user.tst&gt;</attribute>
+ </item>
+ <item rid="E" mimetype="application/octet-stream">
+ <payload>testmailbody4</payload>
+ <attribute type="HEAD">From: &lt;test4@user.tst&gt;</attribute>
+ </item>
+ <item rid="F" mimetype="application/octet-stream">
+ <payload>testmailbody5</payload>
+ <attribute type="HEAD">From: &lt;test5@user.tst&gt;</attribute>
+ </item>
+ <item rid="G" mimetype="application/octet-stream">
+ <payload>testmailbody6</payload>
+ <attribute type="HEAD">From: &lt;test6@user.tst&gt;</attribute>
+ </item>
+ <item rid="H" mimetype="application/octet-stream">
+ <payload>testmailbody7</payload>
+ <attribute type="HEAD">From: &lt;test7@user.tst&gt;</attribute>
+ </item>
+ <item rid="I" mimetype="application/octet-stream">
+ <payload>testmailbody8</payload>
+ <attribute type="HEAD">From: &lt;test8@user.tst&gt;</attribute>
+ </item>
+ <item rid="J" mimetype="application/octet-stream">
+ <payload>testmailbody9</payload>
+ <attribute type="HEAD">From: &lt;test9@user.tst&gt;</attribute>
+ </item>
+ <item rid="K" mimetype="application/octet-stream">
+ <payload>testmailbody10</payload>
+ <attribute type="HEAD">From: &lt;test10@user.tst&gt;</attribute>
+ </item>
+ <item rid="L" mimetype="application/octet-stream">
+ <payload>testmailbody11</payload>
+ <attribute type="HEAD">From: &lt;test11@user.tst&gt;</attribute>
+ </item>
+ <item rid="M" mimetype="application/octet-stream">
+ <payload>testmailbody12</payload>
+ <attribute type="HEAD">From: &lt;test12@user.tst&gt;</attribute>
+ </item>
+ <item rid="N" mimetype="application/octet-stream">
+ <payload>testmailbody13</payload>
+ <attribute type="HEAD">From: &lt;test13@user.tst&gt;</attribute>
+ </item>
+ <item rid="O" mimetype="application/octet-stream">
+ <payload>testmailbody14</payload>
+ <attribute type="HEAD">From: &lt;test14@user.tst&gt;</attribute>
+ </item>
+ </collection>
+ </collection>
+ <tag name="name" type="type" gid="taggid" rid="tagrid"></tag>
+</knut>
diff --git a/messageviewer/autotests/unittestenv/xdglocal/testdata-res2.xml b/messageviewer/autotests/unittestenv/xdglocal/testdata-res2.xml
new file mode 100644
index 0000000..b12f3b3
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/xdglocal/testdata-res2.xml
@@ -0,0 +1,6 @@
+<knut>
+ <collection rid="7" name="res2" content="inode/directory">
+ <collection rid="5" name="foo2" content=""/>
+ <collection rid="9" name="space folder" content=""/>
+ </collection>
+</knut>
diff --git a/messageviewer/autotests/unittestenv/xdglocal/testdata-res3.xml b/messageviewer/autotests/unittestenv/xdglocal/testdata-res3.xml
new file mode 100644
index 0000000..0c3b7a8
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/xdglocal/testdata-res3.xml
@@ -0,0 +1,4 @@
+<knut>
+ <collection rid="8" name="res3" content="inode/directory,application/octet-stream">
+ </collection>
+</knut>
diff --git a/messageviewer/autotests/unittestenv/xdglocal/testdata.xml b/messageviewer/autotests/unittestenv/xdglocal/testdata.xml
new file mode 100644
index 0000000..06559c2
--- /dev/null
+++ b/messageviewer/autotests/unittestenv/xdglocal/testdata.xml
@@ -0,0 +1,82 @@
+<knut>
+ <collection rid="6" name="res1" content="inode/directory">
+ <collection rid="10" name="foo" content="inode/directory,application/octet-stream,text/directory,text/calendar">
+ <collection rid="2" name="bar" content="inode/directory">
+ <collection rid="3" name="bla" content="inode/directory">
+ </collection>
+ </collection>
+ <collection rid="4" name="bla" content="inode/directory">
+ </collection>
+ <item rid="A" mimetype="application/octet-stream">
+ <payload>testmailbody</payload>
+ <attribute type="HEAD">From: &lt;test@user.tst&gt;</attribute>
+ <flag>\SEEN</flag>
+ <flag>\FLAGGED</flag>
+ <flag>\DRAFT</flag>
+ </item>
+ <item rid="B" mimetype="application/octet-stream">
+ <payload>testmailbody1</payload>
+ <attribute type="HEAD">From: &lt;test1@user.tst&gt;</attribute>
+ <flag>\FLAGGED</flag>
+ </item>
+ <item rid="C" mimetype="application/octet-stream">
+ <payload>testmailbody2</payload>
+ <attribute type="HEAD">From: &lt;test2@user.tst&gt;</attribute>
+ </item>
+ <item rid="D" mimetype="application/octet-stream">
+ <payload>testmailbody3</payload>
+ <attribute type="HEAD">From: &lt;test3@user.tst&gt;</attribute>
+ </item>
+ <item rid="E" mimetype="application/octet-stream">
+ <payload>testmailbody4</payload>
+ <attribute type="HEAD">From: &lt;test4@user.tst&gt;</attribute>
+ </item>
+ <item rid="F" mimetype="application/octet-stream">
+ <payload>testmailbody5</payload>
+ <attribute type="HEAD">From: &lt;test5@user.tst&gt;</attribute>
+ </item>
+ <item rid="G" mimetype="application/octet-stream">
+ <payload>testmailbody6</payload>
+ <attribute type="HEAD">From: &lt;test6@user.tst&gt;</attribute>
+ </item>
+ <item rid="H" mimetype="application/octet-stream">
+ <payload>testmailbody7</payload>
+ <attribute type="HEAD">From: &lt;test7@user.tst&gt;</attribute>
+ </item>
+ <item rid="I" mimetype="application/octet-stream">
+ <payload>testmailbody8</payload>
+ <attribute type="HEAD">From: &lt;test8@user.tst&gt;</attribute>
+ </item>
+ <item rid="J" mimetype="application/octet-stream">
+ <payload>testmailbody9</payload>
+ <attribute type="HEAD">From: &lt;test9@user.tst&gt;</attribute>
+ </item>
+ <item rid="K" mimetype="application/octet-stream">
+ <payload>testmailbody10</payload>
+ <attribute type="HEAD">From: &lt;test10@user.tst&gt;</attribute>
+ </item>
+ <item rid="L" mimetype="application/octet-stream">
+ <payload>testmailbody11</payload>
+ <attribute type="HEAD">From: &lt;test11@user.tst&gt;</attribute>
+ </item>
+ <item rid="M" mimetype="application/octet-stream">
+ <payload>testmailbody12</payload>
+ <attribute type="HEAD">From: &lt;test12@user.tst&gt;</attribute>
+ </item>
+ <item rid="N" mimetype="application/octet-stream">
+ <payload>testmailbody13</payload>
+ <attribute type="HEAD">From: &lt;test13@user.tst&gt;</attribute>
+ </item>
+ <item rid="O" mimetype="application/octet-stream">
+ <payload>testmailbody14</payload>
+ <attribute type="HEAD">From: &lt;test14@user.tst&gt;</attribute>
+ </item>
+ </collection>
+ </collection>
+ <collection rid="7" name="res2" content="inode/directory">
+ <collection rid="5" name="foo2" content=""/>
+ <collection rid="9" name="space folder" content=""/>
+ </collection>
+ <collection rid="8" name="res3" content="inode/directory,application/octet-stream">
+ </collection>
+</knut>