Skip to content

Commit cb555b5

Browse files
committed
try shared library
1 parent 9de6384 commit cb555b5

File tree

5 files changed

+7
-283
lines changed

5 files changed

+7
-283
lines changed

.github/workflows/encrypted_settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
from mongodb_settings import * # noqa: F403
55
from pymongo.encryption import AutoEncryptionOpts
66

7+
os.environ["LD_LIBRARY_PATH"] = os.environ["GITHUB_WORKSPACE"] + "/lib/"
8+
79
DATABASES["encrypted"] = { # noqa: F405
810
"ENGINE": "django_mongodb_backend",
911
"NAME": "djangotests_encrypted",
1012
"OPTIONS": {
1113
"auto_encryption_opts": AutoEncryptionOpts(
1214
key_vault_namespace="djangotests_encrypted.__keyVault",
1315
kms_providers={"local": {"key": os.urandom(96)}},
16+
crypt_shared_lib_path=os.environ["GITHUB_WORKSPACE"] + "/lib/mongo_crypt_v1.so",
1417
),
1518
"directConnection": True,
1619
},

.github/workflows/runtests.py

Lines changed: 0 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -6,151 +6,6 @@
66
from django.core.exceptions import ImproperlyConfigured
77

88
test_apps = [
9-
"admin_changelist",
10-
"admin_checks",
11-
"admin_custom_urls",
12-
"admin_docs",
13-
"admin_filters",
14-
"admin_inlines",
15-
"admin_ordering",
16-
"admin_scripts",
17-
"admin_utils",
18-
"admin_views",
19-
"admin_widgets",
20-
"aggregation",
21-
"aggregation_regress",
22-
"annotations",
23-
"apps",
24-
"async",
25-
"auth_tests",
26-
"backends",
27-
"basic",
28-
"bulk_create",
29-
"cache",
30-
"check_framework",
31-
"constraints",
32-
"contenttypes_tests",
33-
"context_processors",
34-
"custom_columns",
35-
"custom_lookups",
36-
"custom_managers",
37-
"custom_pk",
38-
"datatypes",
39-
"dates",
40-
"datetimes",
41-
"db_functions",
42-
"defer",
43-
"defer_regress",
44-
"delete",
45-
"delete_regress",
46-
"empty",
47-
"empty_models",
48-
"expressions",
49-
"expressions_case",
50-
"field_defaults",
51-
"file_storage",
52-
"file_uploads",
53-
"fixtures",
54-
"fixtures_model_package",
55-
"fixtures_regress",
56-
"flatpages_tests",
57-
"force_insert_update",
58-
"foreign_object",
59-
"forms_tests",
60-
"from_db_value",
61-
"generic_inline_admin",
62-
"generic_relations",
63-
"generic_relations_regress",
64-
"generic_views",
65-
"get_earliest_or_latest",
66-
"get_object_or_404",
67-
"get_or_create",
68-
"i18n",
69-
"indexes",
70-
"inline_formsets",
71-
"introspection",
72-
"invalid_models_tests",
73-
"known_related_objects",
74-
"lookup",
75-
"m2m_and_m2o",
76-
"m2m_intermediary",
77-
"m2m_multiple",
78-
"m2m_recursive",
79-
"m2m_regress",
80-
"m2m_signals",
81-
"m2m_through",
82-
"m2m_through_regress",
83-
"m2o_recursive",
84-
"managers_regress",
85-
"many_to_many",
86-
"many_to_one",
87-
"many_to_one_null",
88-
"max_lengths",
89-
"messages_tests",
90-
"migrate_signals",
91-
"migration_test_data_persistence",
92-
"migrations",
93-
"model_fields",
94-
"model_forms",
95-
"model_formsets",
96-
"model_formsets_regress",
97-
"model_indexes",
98-
"model_inheritance",
99-
"model_inheritance_regress",
100-
"model_options",
101-
"model_package",
102-
"model_regress",
103-
"model_utils",
104-
"modeladmin",
105-
"multiple_database",
106-
"mutually_referential",
107-
"nested_foreign_keys",
108-
"null_fk",
109-
"null_fk_ordering",
110-
"null_queries",
111-
"one_to_one",
112-
"or_lookups",
113-
"order_with_respect_to",
114-
"ordering",
115-
"pagination",
116-
"prefetch_related",
117-
"proxy_model_inheritance",
118-
"proxy_models",
119-
"queries",
120-
"queryset_pickle",
121-
"redirects_tests",
122-
"reserved_names",
123-
"reverse_lookup",
124-
"save_delete_hooks",
125-
"schema",
126-
"select_for_update",
127-
"select_related",
128-
"select_related_onetoone",
129-
"select_related_regress",
130-
"serializers",
131-
"servers",
132-
"sessions_tests",
133-
"shortcuts",
134-
"signals",
135-
"sitemaps_tests",
136-
"sites_framework",
137-
"sites_tests",
138-
"string_lookup",
139-
"swappable_models",
140-
"syndication_tests",
141-
"test_client",
142-
"test_client_regress",
143-
"test_runner",
144-
"test_utils",
145-
"timezones",
146-
"transactions",
147-
"unmanaged_models",
148-
"update",
149-
"update_only_fields",
150-
"user_commands",
151-
"validation",
152-
"view_tests",
153-
"xor_lookups",
1549
# Add directories in django_mongodb_backend/tests
15510
*sorted(
15611
[

.github/workflows/test-python-atlas.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,11 @@ jobs:
5252
- name: Start local Atlas
5353
working-directory: .
5454
run: bash .github/workflows/start_local_atlas.sh mongodb/mongodb-atlas-local:8.0.15
55-
- name: Install mongosh
55+
- name: Download crypt shared
5656
run: |
57-
wget -q https://downloads.mongodb.com/compass/mongosh-2.2.10-linux-x64.tgz
58-
tar -xzf mongosh-*-linux-x64.tgz
59-
sudo cp mongosh-*-linux-x64/bin/mongosh /usr/local/bin/
60-
mongosh --version
61-
- name: Install mongocryptd from Enterprise tarball
62-
run: |
63-
curl -sSL -o mongodb-enterprise.tgz "https://downloads.mongodb.com/linux/mongodb-linux-x86_64-enterprise-ubuntu2204-8.0.15.tgz"
64-
tar -xzf mongodb-enterprise.tgz
65-
sudo cp mongodb-linux-x86_64-enterprise-ubuntu2204-8.0.15/bin/mongocryptd /usr/local/bin/
66-
- name: Start mongocryptd
67-
run: |
68-
nohup mongocryptd --logpath=/tmp/mongocryptd.log &
69-
- name: Verify MongoDB installation
70-
run: |
71-
mongosh --eval 'db.runCommand({ connectionStatus: 1 })'
72-
- name: Verify mongocryptd is running
73-
run: |
74-
pgrep mongocryptd
57+
wget https://downloads.mongodb.com/linux/mongo_crypt_shared_v1-linux-x86_64-enterprise-ubuntu2404-8.0.15.tgz
58+
tar -xvzf mongo_crypt_shared_v1-linux-x86_64-enterprise-ubuntu2404-8.0.15.tgz lib/mongo_crypt_v1.so
59+
ls -d "$PWD"/lib/mongo_crypt_v1.so
7560
- name: Run tests
7661
run: python3 django_repo/tests/runtests_.py
7762
permissions:

.github/workflows/test-python-geo.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/test-python.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)