self = <swh.storage.tests.test_storage.TestStorage object at 0x7f467c05e748>
swh_storage = <swh.storage.validate.ValidatingProxyStorage object at 0x7f467c05e128>
def test_stat_counters(self, swh_storage):
expected_keys = ["content", "directory", "origin", "revision"]
# Initially, all counters are 0
> swh_storage.refresh_stat_counters()
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:2876:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/core/db/common.py:62: in _meth
return meth(self, *args, db=db, cur=cur, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.storage.Storage object at 0x7f467c05e5f8>
db = <swh.storage.db.Db object at 0x7f45c19b26a0>
cur = <cursor object at 0x7f478e6b1af0; closed: -1>
@db_transaction()
def refresh_stat_counters(self, db=None, cur=None):
keys = [
"content",
"directory",
"directory_entry_dir",
"directory_entry_file",
"directory_entry_rev",
"origin",
"origin_visit",
"person",
"release",
"revision",
"revision_history",
"skipped_content",
"snapshot",
]
for key in keys:
> cur.execute("select * from swh_update_counter(%s)", (key,))
E psycopg2.errors.UndefinedFunction: function swh_update_counter(unknown) does not exist
E LINE 1: select * from swh_update_counter('content')
E ^
E HINT: No function matches the given name and argument types. You might need to add explicit type casts.
.tox/py3/lib/python3.7/site-packages/swh/storage/storage.py:1233: UndefinedFunction
TEST RESULT
TEST RESULT
- Run At
- May 20 2020, 9:28 AM