richardphibel / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

Blame SOURCES/0001-tests-SQL-write-a-readonly-folder.patch

997f37
From 66e08009b8254462cb2c454ff2320355633c20d6 Mon Sep 17 00:00:00 2001
997f37
From: Nicola Sella <nsella@redhat.com>
997f37
Date: Tue, 10 Nov 2020 12:11:17 +0100
997f37
Subject: [PATCH 1/1] [tests] SQL write a readonly folder
997f37
997f37
fixes on rhel8.4 for test_dnf_base and test_dnf_db_group
997f37
libdnf._error.Error: SQLite error on "/var/lib/dnf/history.sqlite":
997f37
Executing an SQL statement failed: attempt to write a readonly
997f37
database
997f37
997f37
=changelog=
997f37
msg: fixes SQL write a readonly folder
997f37
type: bugfix
997f37
---
997f37
 tests/api/test_dnf_base.py     | 1 +
997f37
 tests/api/test_dnf_db_group.py | 1 +
997f37
 2 files changed, 2 insertions(+)
997f37
997f37
diff --git a/tests/api/test_dnf_base.py b/tests/api/test_dnf_base.py
997f37
index b1cf49fb..ca71b75c 100644
997f37
--- a/tests/api/test_dnf_base.py
997f37
+++ b/tests/api/test_dnf_base.py
997f37
@@ -14,6 +14,7 @@ from .common import TOUR_4_4
997f37
 class DnfBaseApiTest(TestCase):
997f37
     def setUp(self):
997f37
         self.base = dnf.Base(dnf.conf.Conf())
997f37
+        self.base.conf.persistdir = "/tmp/tests"
997f37
 
997f37
     def tearDown(self):
997f37
         self.base.close()
997f37
diff --git a/tests/api/test_dnf_db_group.py b/tests/api/test_dnf_db_group.py
997f37
index 447fd121..e1828cb4 100644
997f37
--- a/tests/api/test_dnf_db_group.py
997f37
+++ b/tests/api/test_dnf_db_group.py
997f37
@@ -12,6 +12,7 @@ from .common import TestCase
997f37
 class DnfRPMTransactionApiTest(TestCase):
997f37
     def setUp(self):
997f37
         self.base = dnf.Base(dnf.conf.Conf())
997f37
+        self.base.conf.persistdir = "/tmp/tests"
997f37
         self.base.fill_sack(False, False)
997f37
         self.base.resolve()
997f37
         self.rpmTrans = self.base.transaction
997f37
-- 
997f37
2.26.2
997f37