TF-2528 Add integration test for search email with sort by sender nam…e ascending

This commit is contained in:
dab246
2024-11-13 15:51:25 +07:00
committed by Dat H. Pham
parent cf2a0b08e5
commit 51a4a1b9b7
27 changed files with 591 additions and 59 deletions
@@ -0,0 +1,40 @@
Return-Path: <alice@example.com>
MIME-Version: 1.0
References: <Mime4j.4c.b3b452d18f0d0ef9.192d67aaafc@example.com>
Subject: Alice send Bob
From: alice@example.com
To: "bob@example.com" <bob@example.com>
Reply-To: alice@example.com
Date: Tue, 29 Oct 2024 04:13:50 +0000
Message-ID: <Mime4j.4e.728b2b72b23cc182.192d67ae03c@example.com>
User-Agent: Twake-Mail/0.13.2 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15;
rv:131.0) Gecko/20100101 Firefox/131.0
Content-Type: multipart/alternative;
boundary="-=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-"
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
Hello Bob.
Invite you in to a meeting: Event OPEN TECH TALK: INNOVATION FOR THE TWAKE WORKPLACE
Our 3rd Open Tech Talk in 2024!
► Topic: "Enhancing Multi-Tenancy Security"
► Topic: "Bringing Desktop Synchronization into TDrive"
► Topic: "Websocket: Real-time Update
We are waiting for you!
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=---
@@ -0,0 +1,40 @@
Return-Path: <brian@example.com>
MIME-Version: 1.0
References: <Mime4j.4c.b3b452d18f0d0ef9.192d67aaafc@example.com>
Subject: Brian send Bob
From: brian@example.com
To: "bob@example.com" <bob@example.com>
Reply-To: brian@example.com
Date: Wed, 30 Oct 2024 08:13:50 +0000
Message-ID: <Mime4j.4e.728b2b72b23cc182.192d67ae03c@example.com>
User-Agent: Twake-Mail/0.13.2 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15;
rv:131.0) Gecko/20100101 Firefox/131.0
Content-Type: multipart/alternative;
boundary="-=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-"
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
Hello Bob.
Invite you in to a meeting: Event OPEN TECH TALK: INNOVATION FOR THE TWAKE WORKPLACE
Our 3rd Open Tech Talk in 2024!
► Topic: "Enhancing Multi-Tenancy Security"
► Topic: "Bringing Desktop Synchronization into TDrive"
► Topic: "Websocket: Real-time Update
We are waiting for you!
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=---
@@ -0,0 +1,40 @@
Return-Path: <charlotte@example.com>
MIME-Version: 1.0
References: <Mime4j.4c.b3b452d18f0d0ef9.192d67aaafc@example.com>
Subject: Charlotte send Bob
From: charlotte@example.com
To: "bob@example.com" <bob@example.com>
Reply-To: charlotte@example.com
Date: Thu, 31 Oct 2024 12:13:50 +0000
Message-ID: <Mime4j.4e.728b2b72b23cc182.192d67ae03c@example.com>
User-Agent: Twake-Mail/0.13.2 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15;
rv:131.0) Gecko/20100101 Firefox/131.0
Content-Type: multipart/alternative;
boundary="-=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-"
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
Hello Bob.
Invite you in to a meeting: Event OPEN TECH TALK: INNOVATION FOR THE TWAKE WORKPLACE
Our 3rd Open Tech Talk in 2024!
► Topic: "Enhancing Multi-Tenancy Security"
► Topic: "Bringing Desktop Synchronization into TDrive"
► Topic: "Websocket: Real-time Update
We are waiting for you!
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=---
@@ -0,0 +1,40 @@
Return-Path: <david@example.com>
MIME-Version: 1.0
References: <Mime4j.4c.b3b452d18f0d0ef9.192d67aaafc@example.com>
Subject: David send Bob
From: david@example.com
To: "bob@example.com" <bob@example.com>
Reply-To: david@example.com
Date: Fri, 1 Nov 2024 07:13:50 +0000
Message-ID: <Mime4j.4e.728b2b72b23cc182.192d67ae03c@example.com>
User-Agent: Twake-Mail/0.13.2 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15;
rv:131.0) Gecko/20100101 Firefox/131.0
Content-Type: multipart/alternative;
boundary="-=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-"
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
Hello Bob.
Invite you in to a meeting: Event OPEN TECH TALK: INNOVATION FOR THE TWAKE WORKPLACE
Our 3rd Open Tech Talk in 2024!
► Topic: "Enhancing Multi-Tenancy Security"
► Topic: "Bringing Desktop Synchronization into TDrive"
► Topic: "Websocket: Real-time Update
We are waiting for you!
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=---
@@ -0,0 +1,40 @@
Return-Path: <emma@example.com>
MIME-Version: 1.0
References: <Mime4j.4c.b3b452d18f0d0ef9.192d67aaafc@example.com>
Subject: Emma send Bob
From: emma@example.com
To: "bob@example.com" <bob@example.com>
Reply-To: emma@example.com
Date: Sat, 2 Nov 2024 13:13:50 +0000
Message-ID: <Mime4j.4e.728b2b72b23cc182.192d67ae03c@example.com>
User-Agent: Twake-Mail/0.13.2 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15;
rv:131.0) Gecko/20100101 Firefox/131.0
Content-Type: multipart/alternative;
boundary="-=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-"
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
Hello Bob.
Invite you in to a meeting: Event OPEN TECH TALK: INNOVATION FOR THE TWAKE WORKPLACE
Our 3rd Open Tech Talk in 2024!
► Topic: "Enhancing Multi-Tenancy Security"
► Topic: "Bringing Desktop Synchronization into TDrive"
► Topic: "Websocket: Real-time Update
We are waiting for you!
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=-
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT
Content-Language: en-US
---=Part.4f.450e1cfbcd355387.192d67ae03d.c367d8042fea24dd=---
@@ -0,0 +1,18 @@
#!/bin/bash
# Define users and folders
users=("alice" "bob" "brian" "charlotte" "david" "emma")
# Add users
for user in "${users[@]}"; do
james-cli AddUser "$user@example.com" "$user"
done
# Create search folder for user Bob
james-cli CreateMailbox \#private "bob@example.com" "search"
# Import emails into search folder for user Bob
for eml in {0..4}; do
echo "Importing $eml.eml into search folder for user bob"
james-cli ImportEml \#private "bob@example.com" "search" "/root/conf/integration_test/search_email_with_sort_order/eml/$eml.eml" &
done