From 6185e6605601907a5b865c2030cb183e1fbd575c Mon Sep 17 00:00:00 2001
From: dengzhaosen <dengzhaosen@inspur.com>
Date: Fri, 30 Apr 2021 10:17:15 +0800
Subject: [PATCH] Drop support for SQLite < 3.7

Both Ubuntu 18.04 [1] and CentOS 8 [2] provide sufficiently new versions
of SQLite that make this check unnecessary now.

[1] https://packages.ubuntu.com/bionic/sqlite3
[2] http://mirror.centos.org/centos/7/os/x86_64/Packages/

Change-Id: I49fec5b9521f292df38c54bf5ddcb993d2e13d5c
---
 manila/tests/db/sqlalchemy/test_api.py | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/manila/tests/db/sqlalchemy/test_api.py b/manila/tests/db/sqlalchemy/test_api.py
index 67c133a7f9..33c872c97f 100644
--- a/manila/tests/db/sqlalchemy/test_api.py
+++ b/manila/tests/db/sqlalchemy/test_api.py
@@ -3583,12 +3583,6 @@ class PurgeDeletedTest(test.TestCase):
         return timeutils.utcnow() - datetime.timedelta(
             days=random.randint(begin, end))
 
-    def _sqlite_has_fk_constraint(self):
-        # SQLAlchemy doesn't support it at all with < SQLite 3.6.19
-        import sqlite3
-        tup = sqlite3.sqlite_version_info
-        return tup[0] > 3 or (tup[0] == 3 and tup[1] >= 7)
-
     def _turn_on_foreign_key(self):
         engine = db_api.get_engine()
         connection = engine.raw_connection()
@@ -3671,9 +3665,6 @@ class PurgeDeletedTest(test.TestCase):
                           age_in_days=-1)
 
     def test_purge_records_with_constraint(self):
-        if not self._sqlite_has_fk_constraint():
-            self.skipTest(
-                'sqlite is too old for reliable SQLA foreign_keys')
         self._turn_on_foreign_key()
         type_id = uuidutils.generate_uuid()
         # create share type1