Esempio n. 1
0
def test_select_changes_the_environment(is_running, temp_local, local):
    is_running.expects_call().returns(True)
    temp_local.expects_call().returns("/tmp")
    (local.expects_call()
        .with_args("vagrant ssh-config > /tmp/vagrant_ssh_config"))
    vagrant.select()

    assert core.env.hosts == ["default"]
    assert core.env.password == "vagrant"
    assert core.env.ssh_config_path == "/tmp/vagrant_ssh_config"
    assert core.env.use_ssh_config
Esempio n. 2
0
def test_select_aborts_if_not_running(is_running, abort):
    is_running.expects_call().returns(False)
    abort.expects_call().with_args("Vagrant based VM currently NOT running")
    vagrant.select()