Skip to content

Commit def366b

Browse files
committed
Add default string value for RUN_DB_TESTS
1 parent b23ac9e commit def366b

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

test/integration/models/database/test_database.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def get_db_fork_status():
130130

131131

132132
@pytest.mark.skipif(
133-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
133+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
134134
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
135135
)
136136
def test_get_types(test_linode_client):
@@ -142,7 +142,7 @@ def test_get_types(test_linode_client):
142142

143143

144144
@pytest.mark.skipif(
145-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
145+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
146146
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
147147
)
148148
def test_get_engines(test_linode_client):
@@ -156,7 +156,7 @@ def test_get_engines(test_linode_client):
156156

157157

158158
@pytest.mark.skipif(
159-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
159+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
160160
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
161161
)
162162
def test_database_instance(test_linode_client, test_create_sql_db):
@@ -167,7 +167,7 @@ def test_database_instance(test_linode_client, test_create_sql_db):
167167

168168
# ------- POSTGRESQL DB Test cases -------
169169
@pytest.mark.skipif(
170-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
170+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
171171
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
172172
)
173173
def test_get_sql_db_instance(test_linode_client, test_create_sql_db):
@@ -185,7 +185,7 @@ def test_get_sql_db_instance(test_linode_client, test_create_sql_db):
185185

186186

187187
@pytest.mark.skipif(
188-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
188+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
189189
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
190190
)
191191
def test_update_sql_db(test_linode_client, test_create_sql_db):
@@ -218,7 +218,7 @@ def test_update_sql_db(test_linode_client, test_create_sql_db):
218218

219219

220220
@pytest.mark.skipif(
221-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
221+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
222222
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
223223
)
224224
def test_get_sql_ssl(test_linode_client, test_create_sql_db):
@@ -228,7 +228,7 @@ def test_get_sql_ssl(test_linode_client, test_create_sql_db):
228228

229229

230230
@pytest.mark.skipif(
231-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
231+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
232232
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
233233
)
234234
def test_sql_patch(test_linode_client, test_create_sql_db):
@@ -260,7 +260,7 @@ def test_sql_patch(test_linode_client, test_create_sql_db):
260260

261261

262262
@pytest.mark.skipif(
263-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
263+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
264264
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
265265
)
266266
def test_get_sql_credentials(test_linode_client, test_create_sql_db):
@@ -271,7 +271,7 @@ def test_get_sql_credentials(test_linode_client, test_create_sql_db):
271271

272272

273273
@pytest.mark.skipif(
274-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
274+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
275275
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
276276
)
277277
def test_reset_sql_credentials(test_linode_client, test_create_sql_db):
@@ -290,7 +290,7 @@ def test_reset_sql_credentials(test_linode_client, test_create_sql_db):
290290

291291
# ------- POSTGRESQL DB Test cases -------
292292
@pytest.mark.skipif(
293-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
293+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
294294
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
295295
)
296296
def test_get_postgres_db_instance(test_linode_client, test_create_postgres_db):
@@ -310,7 +310,7 @@ def test_get_postgres_db_instance(test_linode_client, test_create_postgres_db):
310310

311311

312312
@pytest.mark.skipif(
313-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
313+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
314314
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
315315
)
316316
def test_update_postgres_db(test_linode_client, test_create_postgres_db):
@@ -345,7 +345,7 @@ def test_update_postgres_db(test_linode_client, test_create_postgres_db):
345345

346346

347347
@pytest.mark.skipif(
348-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
348+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
349349
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
350350
)
351351
def test_get_postgres_ssl(test_linode_client, test_create_postgres_db):
@@ -355,7 +355,7 @@ def test_get_postgres_ssl(test_linode_client, test_create_postgres_db):
355355

356356

357357
@pytest.mark.skipif(
358-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
358+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
359359
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
360360
)
361361
def test_postgres_patch(test_linode_client, test_create_postgres_db):
@@ -387,7 +387,7 @@ def test_postgres_patch(test_linode_client, test_create_postgres_db):
387387

388388

389389
@pytest.mark.skipif(
390-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
390+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
391391
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
392392
)
393393
def test_get_postgres_credentials(test_linode_client, test_create_postgres_db):
@@ -398,7 +398,7 @@ def test_get_postgres_credentials(test_linode_client, test_create_postgres_db):
398398

399399

400400
@pytest.mark.skipif(
401-
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
401+
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
402402
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
403403
)
404404
def test_reset_postgres_credentials(

0 commit comments

Comments
 (0)