From 48447c2788f5b7ddb69c4e8b89a530d68548e8a7 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Fri, 25 Mar 2022 13:32:15 -0700 Subject: [PATCH] Add the tenant management module to CMakeLists. Don't test tenants before API version 710. --- bindings/bindingtester/bindingtester.py | 2 +- bindings/python/CMakeLists.txt | 1 + bindings/python/tests/tester.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bindings/bindingtester/bindingtester.py b/bindings/bindingtester/bindingtester.py index d914e9d9dc..2856d35855 100755 --- a/bindings/bindingtester/bindingtester.py +++ b/bindings/bindingtester/bindingtester.py @@ -202,7 +202,7 @@ class TestRunner(object): self.args.types = list(reduce(lambda t1, t2: filter(t1.__contains__, t2), map(lambda tester: tester.types, self.testers))) self.args.no_directory_snapshot_ops = self.args.no_directory_snapshot_ops or any([not tester.directory_snapshot_ops_enabled for tester in self.testers]) - self.args.no_tenants = self.args.no_tenants or any([not tester.tenants_enabled for tester in self.testers]) + self.args.no_tenants = self.args.no_tenants or any([not tester.tenants_enabled for tester in self.testers]) or self.args.api_version < 710 def print_test(self): test_instructions = self._generate_test() diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 2174050712..0f871d8c87 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -5,6 +5,7 @@ set(SRCS fdb/locality.py fdb/six.py fdb/subspace_impl.py + fdb/tenant_management.py fdb/tuple.py README.rst MANIFEST.in) diff --git a/bindings/python/tests/tester.py b/bindings/python/tests/tester.py index c514d3a948..936f7015c0 100644 --- a/bindings/python/tests/tester.py +++ b/bindings/python/tests/tester.py @@ -621,7 +621,8 @@ class Tester: test_size_limit_option(db) test_get_approximate_size(db) - test_tenants(db) + if fdb.get_api_version() >= 710: + test_tenants(db) except fdb.FDBError as e: print("Unit tests failed: %s" % e.description)