Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions test/integration/models/database/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def get_db_fork_status():


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


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


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

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


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


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


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


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


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

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


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


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


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


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


@pytest.mark.skipif(
os.getenv("RUN_DB_TESTS").strip().lower() not in {"yes", "true"},
os.getenv("RUN_DB_TESTS", "").strip().lower() not in {"yes", "true"},
reason="RUN_DB_TESTS environment variable must be set to 'yes' or 'true' (case insensitive)",
)
def test_reset_postgres_credentials(
Expand Down