Fetch SSH tunnel creds and test
This commit is contained in:
parent
503c70fa02
commit
592dd6bb69
2 changed files with 45 additions and 0 deletions
|
|
@ -50,3 +50,24 @@ def test_lolaconfig_fetches_trino_creds_properly():
|
|||
lolaconfig.fetch_trino_credentials(s3_reader=fake_s3_reader)
|
||||
|
||||
assert type(lolaconfig.TRINO_CREDENTIALS) is dict
|
||||
|
||||
|
||||
def test_lolaconfig_fetches_ssh_tunnel_creds_properly():
|
||||
lolaconfig = LolaConfig(flow_name="some-flow")
|
||||
|
||||
fake_s3_reader = SimpleNamespace()
|
||||
|
||||
def mock_read_json_from_s3_file(bucket, key):
|
||||
return {
|
||||
"pt_ssh_pkey_path": "some-path",
|
||||
"pt_ssh_pkey_passphrase": "some-password",
|
||||
"pt_ssh_username": "some-username",
|
||||
"pt_ssh_jumphost_port": "some-port",
|
||||
"pt_ssh_jumphost": "some-jumphost",
|
||||
}
|
||||
|
||||
fake_s3_reader.read_json_from_s3_file = mock_read_json_from_s3_file
|
||||
|
||||
lolaconfig.fetch_ssh_tunnel_credentials(s3_reader=fake_s3_reader)
|
||||
|
||||
assert type(lolaconfig.SSH_TUNNEL_CREDENTIALS) is dict
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue