TF-3349 Add integration test for forward email

This commit is contained in:
dab246
2024-12-18 15:48:50 +07:00
committed by Dat H. Pham
parent e9547c780c
commit 03e1c0e13f
15 changed files with 240 additions and 22 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
# Define users and folders
users=("alice" "bob" "brian" "charlotte" "david" "emma")
bobFolders=("Search Emails" "Forward Emails")
# Add users
for user in "${users[@]}"; do
james-cli AddUser "$user@example.com" "$user"
done
# Create folders for user Bob
for folderName in "${bobFolders[@]}"; do
echo "Creating $folderName folder for user bob"
james-cli CreateMailbox \#private "bob@example.com" "$folderName" &
done
# For test search email with sort order
# Import emails into 'Search Emails' folder for user Bob
for eml in {0..4}; do
echo "Importing $eml.eml into 'Search Emails' folder for user bob"
james-cli ImportEml \#private "bob@example.com" "Search Emails" "/root/conf/integration_test/eml/search_email_with_sort_order/$eml.eml" &
done
# For test forward email
# Import emails into 'Forward Emails' folder for user Bob
echo "Importing 0.eml into 'Forward Emails' folder for user bob"
james-cli ImportEml \#private "bob@example.com" "Forward Emails" "/root/conf/integration_test/eml/forward_email/0.eml"