You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2022/01/28 00:25:47 UTC

[incubator-ponymail-foal] branch master updated: Fix up test

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 45dba2c  Fix up test
45dba2c is described below

commit 45dba2cb6ee4817ee350c7de8203e1ee05cc99e0
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jan 28 00:25:38 2022 +0000

    Fix up test
---
 .github/workflows/integration-tests.yml | 3 ++-
 test/itest_integration.py               | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index c62c014..9da46e6 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -71,7 +71,8 @@ jobs:
         curl -sq "http://localhost:9200/ponymail-source/_mapping?pretty"
     - name: load Database
       run: |
-        tools/import-mbox.py --source test/resources/users_ponymail_apache_org_2019-09.mbox --private
+        # The early messages were under incubator ...
+        tools/import-mbox.py --source test/resources/users_ponymail_apache_org_2019-09.mbox --private --lid users.ponymail.apache.org
         tools/import-mbox.py --source test/resources/users_ponymail_apache_org_2022-01.mbox
     - name: Server
       run: |
diff --git a/test/itest_integration.py b/test/itest_integration.py
index 4c4dc4d..d1199ba 100644
--- a/test/itest_integration.py
+++ b/test/itest_integration.py
@@ -71,7 +71,7 @@ def test_private_stats():
     cookies = get_cookies('user')
     # only fetch the private mail stats
     jzon = requests.get(
-        f"{API_BASE}/stats.lua?list=users&domain=ponymail.apache.org&emailsOnly&d=gte=0d",
+        f"{API_BASE}/stats.lua?list=users&domain=ponymail.apache.org&emailsOnly&d=2019-09",
         cookies=cookies
     ).json()
     # The earlier mails are private
@@ -79,9 +79,9 @@ def test_private_stats():
     assert jzon['firstMonth'] == 9
     assert jzon['lastYear'] == 2022
     assert jzon['lastMonth'] == 1
-    assert jzon['hits'] == 10
+    assert jzon['hits'] == 4
     for email in jzon['emails']:
         assert email['list_raw'] == '<users.ponymail.apache.org>'
         assert email['list'] == email['list_raw']
         assert email['id'] == email['mid']
-        # assert email['private']
+        assert email['private']