mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
bitbake: hashserv: Add db-usage API
Adds an API to query the server for the usage of the database (e.g. how many rows are present in each table) (Bitbake rev: c9c1224447e147e0de92953bc85cea75670b898c) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8cfb94c06c
commit
3a2c5a6fa2
@@ -767,6 +767,15 @@ class HashEquivalenceCommonTests(object):
|
||||
with self.auth_perms("@user-admin") as client:
|
||||
become = client.become_user(client.username)
|
||||
|
||||
def test_get_db_usage(self):
|
||||
usage = self.client.get_db_usage()
|
||||
|
||||
self.assertTrue(isinstance(usage, dict))
|
||||
for name in usage.keys():
|
||||
self.assertTrue(isinstance(usage[name], dict))
|
||||
self.assertIn("rows", usage[name])
|
||||
self.assertTrue(isinstance(usage[name]["rows"], int))
|
||||
|
||||
|
||||
class TestHashEquivalenceUnixServer(HashEquivalenceTestSetup, HashEquivalenceCommonTests, unittest.TestCase):
|
||||
def get_server_addr(self, server_idx):
|
||||
|
||||
Reference in New Issue
Block a user