chantra / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

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

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