dcavalca / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

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

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