summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/hashserv/tests.py
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2023-11-03 08:26:34 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-09 17:33:03 +0000
commitc1574ae46f7a5701d79f2c1d333094a5d5919a46 (patch)
tree1dd237ed9b65dd29000fbf9acdd3c5d4eb86f4f3 /bitbake/lib/hashserv/tests.py
parent3a2c5a6fa2e0081c28d5f2f43e1d9a79d093ea37 (diff)
downloadpoky-c1574ae46f7a5701d79f2c1d333094a5d5919a46.tar.gz
bitbake: hashserv: Add database column query API
Adds an API to retrieve the columns that can be queried on from the database backend. This prevents front end applications from needing to hardcode the query columns (Bitbake rev: abfce2b68bdab02ea2e9a63fbb3b9e270428a0a6) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/hashserv/tests.py')
-rw-r--r--bitbake/lib/hashserv/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/hashserv/tests.py b/bitbake/lib/hashserv/tests.py
index 9d5bec2454..fc69acaf7c 100644
--- a/bitbake/lib/hashserv/tests.py
+++ b/bitbake/lib/hashserv/tests.py
@@ -776,6 +776,14 @@ class HashEquivalenceCommonTests(object):
776 self.assertIn("rows", usage[name]) 776 self.assertIn("rows", usage[name])
777 self.assertTrue(isinstance(usage[name]["rows"], int)) 777 self.assertTrue(isinstance(usage[name]["rows"], int))
778 778
779 def test_get_db_query_columns(self):
780 columns = self.client.get_db_query_columns()
781
782 self.assertTrue(isinstance(columns, list))
783 self.assertTrue(len(columns) > 0)
784
785 for col in columns:
786 self.client.remove({col: ""})
779 787
780class TestHashEquivalenceUnixServer(HashEquivalenceTestSetup, HashEquivalenceCommonTests, unittest.TestCase): 788class TestHashEquivalenceUnixServer(HashEquivalenceTestSetup, HashEquivalenceCommonTests, unittest.TestCase):
781 def get_server_addr(self, server_idx): 789 def get_server_addr(self, server_idx):