Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slords committed Sep 26, 2024
1 parent 95efe68 commit f174678
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions tests/profiles/oracle/test_oracle_user_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ def test_connection_claiming() -> None:
"""
potential_values = {
"conn_type": "oracle",
"host": "my_host",
"login": "my_user",
"password": "my_password",
"extra": '{"service_name": "my_service"}',
}

# if we're missing any of the required values, it shouldn't claim
Expand Down Expand Up @@ -114,8 +112,10 @@ def test_profile_args(
"user": mock_oracle_conn.login,
"password": "{{ env_var('COSMOS_CONN_ORACLE_PASSWORD') }}",
"port": mock_oracle_conn.port,
"service_name": "my_service",
"database": "my_service",
"service": "my_service",
"schema": "my_schema",
"protocol": "tcp",
}


Expand All @@ -127,11 +127,16 @@ def test_profile_args_overrides(
"""
profile_mapping = get_automatic_profile_mapping(
mock_oracle_conn.conn_id,
profile_args={"schema": "my_schema", "service_name": "my_service_override"},
profile_args={
"schema": "my_schema_override",
"database": "my_database_override",
"service": "my_service_override",
},
)
assert profile_mapping.profile_args == {
"schema": "my_schema",
"service_name": "my_service_override",
"schema": "my_schema_override",
"database": "my_database_override",
"service": "my_service_override",
}

assert profile_mapping.profile == {
Expand All @@ -140,8 +145,10 @@ def test_profile_args_overrides(
"user": mock_oracle_conn.login,
"password": "{{ env_var('COSMOS_CONN_ORACLE_PASSWORD') }}",
"port": mock_oracle_conn.port,
"service_name": "my_service_override",
"schema": "my_schema",
"database": "my_database_override",
"service": "my_service_override",
"schema": "my_schema_override",
"protocol": "tcp",
}


Expand Down

0 comments on commit f174678

Please sign in to comment.