summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-01-28 17:12:27 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-01-29 18:00:46 +0100
commit744eb9b35b2224d0134f492b4692c0d07bed2e96 (patch)
tree61cf83a102823b66d19e296056dfbb2e9630f112 /dbaccess
parent97803ae75c27368aa2880f58c0c661b9a01d4d00 (diff)
dbaccess: fix Tdf119625Test with read-only $SRCDIR
The buildLowLevelConnection() will try to modify the read-only storage and throw IOException. Change-Id: I9b8ec840bebcac3c8a69bc6921d32e692d9d9e86 Reviewed-on: https://gerrit.libreoffice.org/67027 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit f4be87e0583775fa5074aefa4bef4124b0c2d894) Reviewed-on: https://gerrit.libreoffice.org/67061 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/qa/unit/hsql_binary_import.cxx5
-rw-r--r--dbaccess/qa/unit/tdf119625.cxx4
2 files changed, 6 insertions, 3 deletions
diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx b/dbaccess/qa/unit/hsql_binary_import.cxx
index 8bc81c0587b1..2c1c332629cb 100644
--- a/dbaccess/qa/unit/hsql_binary_import.cxx
+++ b/dbaccess/qa/unit/hsql_binary_import.cxx
@@ -45,8 +45,9 @@ void HsqlBinaryImportTest::setUp()
void HsqlBinaryImportTest::testBinaryImport()
{
- uno::Reference<XOfficeDatabaseDocument> xDocument
- = getDocumentForFileName("hsqldb_migration_test.odb");
+ // the migration requires the file to be writable
+ utl::TempFile const temp(createTempCopy("hsqldb_migration_test.odb"));
+ uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
// at this point migration is already done
diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index f9aea7b8d004..d38e85bb75a3 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -63,7 +63,9 @@ static const expect_t expect[]
void Tdf119625Test::testTime()
{
- uno::Reference<XOfficeDatabaseDocument> xDocument = getDocumentForFileName("tdf119625.odb");
+ // the migration requires the file to be writable
+ utl::TempFile const temp(createTempCopy("tdf119625.odb"));
+ uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
// at this point migration is already done