コード例 #1
0
def test_ssh_host_override_from_config(mock_file, mock_exists, dvc, config,
                                       expected_host):
    fs = SSHFileSystem(dvc, config)

    mock_exists.assert_called_with(SSHFileSystem.ssh_config_filename())
    mock_file.assert_called_with(SSHFileSystem.ssh_config_filename())
    assert fs.path_info.host == expected_host
コード例 #2
0
def test_ssh_allow_agent(mock_file, mock_exists, dvc, config,
                         expected_allow_agent):
    fs = SSHFileSystem(dvc, config)

    mock_exists.assert_called_with(SSHFileSystem.ssh_config_filename())
    mock_file.assert_called_with(SSHFileSystem.ssh_config_filename())
    assert fs.allow_agent == expected_allow_agent
コード例 #3
0
def test_ssh_gss_auth(mock_file, mock_exists, dvc, config, expected_gss_auth):
    fs = SSHFileSystem(dvc, config)

    mock_exists.assert_called_with(SSHFileSystem.ssh_config_filename())
    mock_file.assert_called_with(SSHFileSystem.ssh_config_filename())
    assert fs.gss_auth == expected_gss_auth
コード例 #4
0
def test_ssh_keyfile(mock_file, mock_exists, dvc, config, expected_keyfile):
    fs = SSHFileSystem(dvc, config)

    mock_exists.assert_called_with(SSHFileSystem.ssh_config_filename())
    mock_file.assert_called_with(SSHFileSystem.ssh_config_filename())
    assert fs.keyfile == expected_keyfile
コード例 #5
0
def test_ssh_port(mock_file, mock_exists, dvc, config, expected_port):
    fs = SSHFileSystem(dvc, config)

    mock_exists.assert_called_with(SSHFileSystem.ssh_config_filename())
    mock_file.assert_called_with(SSHFileSystem.ssh_config_filename())
    assert fs.path_info.port == expected_port
コード例 #6
0
ファイル: test_ssh.py プロジェクト: ush98/dvc
def test_ssh_user(mock_file, mock_exists, config, expected_user):
    fs = SSHFileSystem(**config)

    mock_exists.assert_called_with(SSHFileSystem.ssh_config_filename())
    mock_file.assert_called_with(SSHFileSystem.ssh_config_filename())
    assert fs.user == expected_user