示例#1
0
def test_ssh_host_override_from_config(mock_file, mock_exists, dvc, config,
                                       expected_host):
    tree = SSHTree(dvc, config)

    mock_exists.assert_called_with(SSHTree.ssh_config_filename())
    mock_file.assert_called_with(SSHTree.ssh_config_filename())
    assert tree.path_info.host == expected_host
示例#2
0
def test_ssh_allow_agent(mock_file, mock_exists, dvc, config,
                         expected_allow_agent):
    tree = SSHTree(dvc, config)

    mock_exists.assert_called_with(SSHTree.ssh_config_filename())
    mock_file.assert_called_with(SSHTree.ssh_config_filename())
    assert tree.allow_agent == expected_allow_agent
示例#3
0
def test_ssh_keyfile(mock_file, mock_exists, dvc, config, expected_keyfile):
    tree = SSHTree(dvc, config)

    mock_exists.assert_called_with(SSHTree.ssh_config_filename())
    mock_file.assert_called_with(SSHTree.ssh_config_filename())
    assert tree.keyfile == expected_keyfile
示例#4
0
def test_ssh_gss_auth(mock_file, mock_exists, dvc, config, expected_gss_auth):
    tree = SSHTree(dvc, config)

    mock_exists.assert_called_with(SSHTree.ssh_config_filename())
    mock_file.assert_called_with(SSHTree.ssh_config_filename())
    assert tree.gss_auth == expected_gss_auth
示例#5
0
def test_ssh_port(mock_file, mock_exists, dvc, config, expected_port):
    tree = SSHTree(dvc, config)

    mock_exists.assert_called_with(SSHTree.ssh_config_filename())
    mock_file.assert_called_with(SSHTree.ssh_config_filename())
    assert tree.path_info.port == expected_port