From 9e3fee9594019deaeb458a169bb041e8769da646 Mon Sep 17 00:00:00 2001 From: Patrik Polakovič Date: Aug 19 2021 21:15:43 +0000 Subject: [PATCH 1/2] Expand mirrors.tar.xz to cover an entire month --- diff --git a/test_data/mirrors.tar.xz b/test_data/mirrors.tar.xz index 0f8d8c0..2edd2fb 100644 Binary files a/test_data/mirrors.tar.xz and b/test_data/mirrors.tar.xz differ diff --git a/tests/test_parse.py b/tests/test_parse.py index c47d37c..1ed6f50 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -76,7 +76,8 @@ def test_read_file(tmp_path_cwd, log_tar, db_tar): matchmode="countme", format="csv", sqlite=str(tmp_path_cwd / "test_result.db"), - logs=[str(tmp_path_cwd / "mirrors.fedoraproject.org-access.log.processed")], + logs=[str(tmp_path_cwd / str(i) / "mirrors.fedoraproject.org-access.log.processed") + for i in range(1, 32)], ) parse(args) db = sqlite3.connect(args.sqlite) From 2eb0267f7627ca6bf4fede81ea33260171f085c9 Mon Sep 17 00:00:00 2001 From: Adam Saleh Date: Aug 19 2021 22:03:50 +0000 Subject: [PATCH 2/2] Fix the path to logs for testing, change result accordingly --- diff --git a/test_data/test_result_cmp.tar.xz b/test_data/test_result_cmp.tar.xz index 6626584..f6ecced 100644 Binary files a/test_data/test_result_cmp.tar.xz and b/test_data/test_result_cmp.tar.xz differ diff --git a/tests/test_parse.py b/tests/test_parse.py index 1ed6f50..21f9c39 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -76,8 +76,10 @@ def test_read_file(tmp_path_cwd, log_tar, db_tar): matchmode="countme", format="csv", sqlite=str(tmp_path_cwd / "test_result.db"), - logs=[str(tmp_path_cwd / str(i) / "mirrors.fedoraproject.org-access.log.processed") - for i in range(1, 32)], + logs=[ + str(tmp_path_cwd / "mirrors" / str(i) / "mirrors.fedoraproject.org-access.log") + for i in range(1, 32) + ], ) parse(args) db = sqlite3.connect(args.sqlite)