コード例 #1
0
ファイル: test_ssh.py プロジェクト: rjsears/dvc
def test_ssh_host_override_from_config(mock_file, mock_exists, dvc, config,
                                       expected_host):
    remote = SSHRemote(dvc, config)

    mock_exists.assert_called_with(SSHRemoteTree.ssh_config_filename())
    mock_file.assert_called_with(SSHRemoteTree.ssh_config_filename())
    assert remote.tree.path_info.host == expected_host
コード例 #2
0
def test_ssh_user(mock_file, mock_exists, dvc, config, expected_user):
    tree = SSHRemoteTree(dvc, config)

    mock_exists.assert_called_with(SSHRemoteTree.ssh_config_filename())
    mock_file.assert_called_with(SSHRemoteTree.ssh_config_filename())
    assert tree.path_info.user == expected_user
コード例 #3
0
def test_ssh_gss_auth(mock_file, mock_exists, dvc, config, expected_gss_auth):
    tree = SSHRemoteTree(dvc, config)

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

    mock_exists.assert_called_with(SSHRemoteTree.ssh_config_filename())
    mock_file.assert_called_with(SSHRemoteTree.ssh_config_filename())
    assert tree.keyfile == expected_keyfile
コード例 #5
0
ファイル: test_ssh.py プロジェクト: rjsears/dvc
def test_ssh_port(mock_file, mock_exists, dvc, config, expected_port):
    remote = SSHRemote(dvc, config)

    mock_exists.assert_called_with(SSHRemoteTree.ssh_config_filename())
    mock_file.assert_called_with(SSHRemoteTree.ssh_config_filename())
    assert remote.path_info.port == expected_port