Skip to content

Commit af672fc

Browse files
committed
ensure environment variable is referenced
1 parent b1addb9 commit af672fc

File tree

2 files changed

+51
-44
lines changed

2 files changed

+51
-44
lines changed

.evergreen/config.yml

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ functions:
3434
add_expansions_to_env: true
3535
args:
3636
- ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
37+
- command: shell.exec
38+
params:
39+
binary: bash
40+
script: |
41+
cat mo-expansion.yml
3742
- command: expansions.update
3843
params:
3944
file: mo-expansion.yml
4045

41-
4246
"run unit tests":
4347
- command: subprocess.exec
4448
type: test
@@ -64,51 +68,51 @@ post:
6468
- func: teardown
6569

6670
tasks:
67-
- name: run-tests
68-
commands:
69-
- func: "run unit tests"
71+
- name: run-tests
72+
commands:
73+
- func: "run unit tests"
7074

7175
buildvariants:
72-
- name: tests-5-noauth-nossl
73-
display_name: Run Tests 5.0 NoAuth NoSSL
74-
run_on: rhel87-small
75-
expansions:
76-
MONGODB_VERSION: "5.0"
77-
TOPOLOGY: server
78-
AUTH: "noauth"
79-
SSL: "nossl"
80-
tasks:
81-
- name: run-tests
76+
- name: tests-5-noauth-nossl
77+
display_name: Run Tests 5.0 NoAuth NoSSL
78+
run_on: rhel87-small
79+
expansions:
80+
MONGODB_VERSION: "5.0"
81+
TOPOLOGY: server
82+
AUTH: "noauth"
83+
SSL: "nossl"
84+
tasks:
85+
- name: run-tests
8286

83-
- name: tests-5-auth-ssl
84-
display_name: Run Tests 5.0 Auth SSL
85-
run_on: rhel87-small
86-
expansions:
87-
MONGODB_VERSION: "5.0"
88-
TOPOLOGY: server
89-
AUTH: "auth"
90-
SSL: "ssl"
91-
tasks:
92-
- name: run-tests
87+
- name: tests-5-auth-ssl
88+
display_name: Run Tests 5.0 Auth SSL
89+
run_on: rhel87-small
90+
expansions:
91+
MONGODB_VERSION: "5.0"
92+
TOPOLOGY: server
93+
AUTH: "auth"
94+
SSL: "ssl"
95+
tasks:
96+
- name: run-tests
9397

94-
- name: tests-8-noauth-nossl
95-
display_name: Run Tests 8.0 NoAuth NoSSL
96-
run_on: rhel87-small
97-
expansions:
98-
MONGODB_VERSION: "8.0"
99-
TOPOLOGY: server
100-
AUTH: "noauth"
101-
SSL: "nossl"
102-
tasks:
103-
- name: run-tests
98+
- name: tests-8-noauth-nossl
99+
display_name: Run Tests 8.0 NoAuth NoSSL
100+
run_on: rhel87-small
101+
expansions:
102+
MONGODB_VERSION: "8.0"
103+
TOPOLOGY: server
104+
AUTH: "noauth"
105+
SSL: "nossl"
106+
tasks:
107+
- name: run-tests
104108

105-
- name: tests-8-auth-ssl
106-
display_name: Run Tests 8.0 Auth SSL
107-
run_on: rhel87-small
108-
expansions:
109-
MONGODB_VERSION: "8.0"
110-
TOPOLOGY: server
111-
AUTH: "auth"
112-
SSL: "ssl"
113-
tasks:
114-
- name: run-tests
109+
- name: tests-8-auth-ssl
110+
display_name: Run Tests 8.0 Auth SSL
111+
run_on: rhel87-small
112+
expansions:
113+
MONGODB_VERSION: "8.0"
114+
TOPOLOGY: server
115+
AUTH: "auth"
116+
SSL: "ssl"
117+
tasks:
118+
- name: run-tests

.github/workflows/mongodb_settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
from django_mongodb_backend import parse_uri
44

5+
56
PARSED_URI = parse_uri(os.getenv("MONGODB_URI")) if os.getenv("MONGODB_URI") else {}
67

8+
if not PARSED_URI:
9+
print("MONGODB_URI not found; please check if environment variable set")
710

811
DATABASES = {
912
"default": {

0 commit comments

Comments
 (0)