Add LogEntry3 table without the extra indexes and switch to writing to it
This commit is contained in:
parent
b6db002729
commit
cdb49dbfd3
12 changed files with 114 additions and 49 deletions
|
@ -111,7 +111,8 @@ def test_does_repo_exist_returns_true(monkeypatch):
|
|||
def test_get_aggregated_logs(monkeypatch):
|
||||
get_aggregated_logs_mock = Mock()
|
||||
get_aggregated_logs_mock.side_effect = [[AttrDict({'day': '1', 'kind_id': 4, 'count': 6})],
|
||||
[AttrDict({'day': '1', 'kind_id': 4, 'count': 12})]]
|
||||
[AttrDict({'day': '1', 'kind_id': 4, 'count': 12})],
|
||||
[AttrDict({'day': '1', 'kind_id': 4, 'count': 3})]]
|
||||
monkeypatch.setattr(model.log, 'get_aggregated_logs', get_aggregated_logs_mock)
|
||||
|
||||
repo_mock = Mock()
|
||||
|
@ -127,4 +128,4 @@ def test_get_aggregated_logs(monkeypatch):
|
|||
actual = pre_oci_model.get_aggregated_logs('start_time', 'end_time', 'performer_name', 'repository_name',
|
||||
'namespace_name', set())
|
||||
|
||||
assert actual == [AggregatedLogEntry(18, 4, '1')]
|
||||
assert actual == [AggregatedLogEntry(21, 4, '1')]
|
||||
|
|
Reference in a new issue