Skip to content

Commit

Permalink
feat: added source_type in output while listing connections list (#803)
Browse files Browse the repository at this point in the history
* feat: added source_type in output while listing connections list ,Unit test updated
  • Loading branch information
SwatiT17 committed Apr 19, 2023
1 parent a8085d3 commit 056275b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data_validation/cli_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,9 +988,9 @@ def list_connections():
"""List all saved connections."""
mgr = state_manager.StateManager()
connections = mgr.list_connections()

for conn_name in connections:
logging.info(f"Connection Name: {conn_name}")
source_type = mgr.get_connection_config(conn_name).get("source_type")
logging.info(f"Connection Name: {conn_name} : {source_type}")


def get_connection(connection_name):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_cli_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_create_and_list_connections(caplog, fs):

# List Connection
cli_tools.list_connections()
assert "Connection Name: test" in caplog.records[1].msg
assert "Connection Name: test : BigQuery" in caplog.records[1].msg


def test_configure_arg_parser_list_and_run_validation_configs():
Expand Down

0 comments on commit 056275b

Please sign in to comment.