From e9b41bddc9a46d8d966c2566ae0b9b19fa9c1f14 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Sat, 14 Dec 2024 14:52:29 -0800 Subject: [PATCH] gmail configuration update --- .../connectors/gmail/test_gmail_connector.py | 26 +++++++++---------- .../daily/connectors/google_drive/conftest.py | 4 +-- .../google_drive/consts_and_utils.py | 2 +- .../slack/test_permission_sync.py | 2 +- .../connector_job_tests/slack/test_prune.py | 2 +- .../unit/onyx/connectors/gmail/thread.json | 16 ++++++------ 6 files changed, 25 insertions(+), 27 deletions(-) diff --git a/backend/tests/daily/connectors/gmail/test_gmail_connector.py b/backend/tests/daily/connectors/gmail/test_gmail_connector.py index 28333334cc7..d746f86bd8d 100644 --- a/backend/tests/daily/connectors/gmail/test_gmail_connector.py +++ b/backend/tests/daily/connectors/gmail/test_gmail_connector.py @@ -13,18 +13,18 @@ """ This thread was 4 emails long: - admin@danswer-test.com -> test-group-1@onyx-test.com (conaining test_user_1 and test_user_2) - test_user_1@onyx-test.com -> admin@danswer-test.com - admin@danswer-test.com -> test_user_2@onyx-test.com + BCC: test_user_3@onyx-test.com - test_user_3@onyx-test.com -> admin@danswer-test.com + admin@onyx-test.com -> test-group-1@onyx-test.com (conaining test_user_1 and test_user_2) + test_user_1@onyx-test.com -> admin@onyx-test.com + admin@onyx-test.com -> test_user_2@onyx-test.com + BCC: test_user_3@onyx-test.com + test_user_3@onyx-test.com -> admin@onyx-test.com """ _THREAD_1_BY_ID: dict[str, dict[str, Any]] = { "192edefb315737c3": { - "email": "admin@danswer-test.com", + "email": "admin@onyx-test.com", "sections_count": 4, "primary_owners": set( [ - "admin@danswer-test.com", + "admin@onyx-test.com", "test_user_1@onyx-test.com", "test_user_3@onyx-test.com", ] @@ -32,7 +32,7 @@ "secondary_owners": set( [ "test-group-1@onyx-test.com", - "admin@danswer-test.com", + "admin@onyx-test.com", "test_user_2@onyx-test.com", "test_user_3@onyx-test.com", ] @@ -41,15 +41,13 @@ "192edf020d2f5def": { "email": "test_user_1@onyx-test.com", "sections_count": 2, - "primary_owners": set(["admin@danswer-test.com", "test_user_1@onyx-test.com"]), - "secondary_owners": set( - ["test-group-1@onyx-test.com", "admin@danswer-test.com"] - ), + "primary_owners": set(["admin@onyx-test.com", "test_user_1@onyx-test.com"]), + "secondary_owners": set(["test-group-1@onyx-test.com", "admin@onyx-test.com"]), }, "192edf020ae90aab": { "email": "test_user_2@onyx-test.com", "sections_count": 2, - "primary_owners": set(["admin@danswer-test.com"]), + "primary_owners": set(["admin@onyx-test.com"]), "secondary_owners": set( ["test-group-1@onyx-test.com", "test_user_2@onyx-test.com"] ), @@ -57,10 +55,10 @@ "192edf18316015fa": { "email": "test_user_3@onyx-test.com", "sections_count": 2, - "primary_owners": set(["admin@danswer-test.com", "test_user_3@onyx-test.com"]), + "primary_owners": set(["admin@onyx-test.com", "test_user_3@onyx-test.com"]), "secondary_owners": set( [ - "admin@danswer-test.com", + "admin@onyx-test.com", "test_user_2@onyx-test.com", "test_user_3@onyx-test.com", ] diff --git a/backend/tests/daily/connectors/google_drive/conftest.py b/backend/tests/daily/connectors/google_drive/conftest.py index 386d59aa474..b8bf0cb5f38 100644 --- a/backend/tests/daily/connectors/google_drive/conftest.py +++ b/backend/tests/daily/connectors/google_drive/conftest.py @@ -28,12 +28,12 @@ _USER_TO_OAUTH_CREDENTIALS_MAP = { - "admin@danswer-test.com": "GOOGLE_DRIVE_OAUTH_CREDENTIALS_JSON_STR", + "admin@onyx-test.com": "GOOGLE_DRIVE_OAUTH_CREDENTIALS_JSON_STR", "test_user_1@onyx-test.com": "GOOGLE_DRIVE_OAUTH_CREDENTIALS_JSON_STR_TEST_USER_1", } _USER_TO_SERVICE_ACCOUNT_CREDENTIALS_MAP = { - "admin@danswer-test.com": "GOOGLE_DRIVE_SERVICE_ACCOUNT_JSON_STR", + "admin@onyx-test.com": "GOOGLE_DRIVE_SERVICE_ACCOUNT_JSON_STR", } diff --git a/backend/tests/daily/connectors/google_drive/consts_and_utils.py b/backend/tests/daily/connectors/google_drive/consts_and_utils.py index c45448062ec..cce7f5c2573 100644 --- a/backend/tests/daily/connectors/google_drive/consts_and_utils.py +++ b/backend/tests/daily/connectors/google_drive/consts_and_utils.py @@ -53,7 +53,7 @@ "https://drive.google.com/drive/u/5/folders/1loe6XJ-pJxu9YYPv7cF3Hmz296VNzA33" ) -ADMIN_EMAIL = "admin@danswer-test.com" +ADMIN_EMAIL = "admin@onyx-test.com" TEST_USER_1_EMAIL = "test_user_1@onyx-test.com" TEST_USER_2_EMAIL = "test_user_2@onyx-test.com" TEST_USER_3_EMAIL = "test_user_3@onyx-test.com" diff --git a/backend/tests/integration/connector_job_tests/slack/test_permission_sync.py b/backend/tests/integration/connector_job_tests/slack/test_permission_sync.py index a0574e34ac4..2928136ec93 100644 --- a/backend/tests/integration/connector_job_tests/slack/test_permission_sync.py +++ b/backend/tests/integration/connector_job_tests/slack/test_permission_sync.py @@ -35,7 +35,7 @@ def test_slack_permission_sync( # Creating an admin user (first user created is automatically an admin) admin_user: DATestUser = UserManager.create( - email="admin@danswer-test.com", + email="admin@onyx-test.com", ) # Creating a non-admin user diff --git a/backend/tests/integration/connector_job_tests/slack/test_prune.py b/backend/tests/integration/connector_job_tests/slack/test_prune.py index cc2ce564159..4fda4d6a63c 100644 --- a/backend/tests/integration/connector_job_tests/slack/test_prune.py +++ b/backend/tests/integration/connector_job_tests/slack/test_prune.py @@ -34,7 +34,7 @@ def test_slack_prune( # Creating an admin user (first user created is automatically an admin) admin_user: DATestUser = UserManager.create( - email="admin@danswer-test.com", + email="admin@onyx-test.com", ) # Creating a non-admin user diff --git a/backend/tests/unit/onyx/connectors/gmail/thread.json b/backend/tests/unit/onyx/connectors/gmail/thread.json index 9b27f466318..da81dcf482f 100644 --- a/backend/tests/unit/onyx/connectors/gmail/thread.json +++ b/backend/tests/unit/onyx/connectors/gmail/thread.json @@ -23,7 +23,7 @@ }, { "name": "From", - "value": "Test Admin Admin " + "value": "Test Admin Admin " }, { "name": "To", @@ -56,7 +56,7 @@ "headers": [ { "name": "Delivered-To", - "value": "admin@danswer-test.com" + "value": "admin@onyx-test.com" }, { "name": "Received", @@ -84,7 +84,7 @@ }, { "name": "Received", - "value": "from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a1e0cc1a2514c-855dae589a1sor1192309241.6.2024.11.02.10.33.34 for (Google Transport Security); Sat, 02 Nov 2024 10:33:34 -0700 (PDT)" + "value": "from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a1e0cc1a2514c-855dae589a1sor1192309241.6.2024.11.02.10.33.34 for (Google Transport Security); Sat, 02 Nov 2024 10:33:34 -0700 (PDT)" }, { "name": "Received-SPF", @@ -144,7 +144,7 @@ }, { "name": "To", - "value": "Test Admin Admin " + "value": "Test Admin Admin " }, { "name": "Content-Type", @@ -201,7 +201,7 @@ }, { "name": "From", - "value": "Test Admin Admin " + "value": "Test Admin Admin " }, { "name": "To", @@ -234,7 +234,7 @@ "headers": [ { "name": "Delivered-To", - "value": "admin@danswer-test.com" + "value": "admin@onyx-test.com" }, { "name": "Received", @@ -262,7 +262,7 @@ }, { "name": "Received", - "value": "from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 71dfb90a1353d-5106f3f9037sor1051490e0c.7.2024.11.02.10.35.06 for (Google Transport Security); Sat, 02 Nov 2024 10:35:06 -0700 (PDT)" + "value": "from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 71dfb90a1353d-5106f3f9037sor1051490e0c.7.2024.11.02.10.35.06 for (Google Transport Security); Sat, 02 Nov 2024 10:35:06 -0700 (PDT)" }, { "name": "Received-SPF", @@ -322,7 +322,7 @@ }, { "name": "To", - "value": "Test Admin Admin " + "value": "Test Admin Admin " }, { "name": "Content-Type",