Update ansible install tests

This commit is contained in:
Brian Cain 2019-12-17 13:34:52 -08:00
parent 582f46231b
commit 7d667c9dea
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
4 changed files with 11 additions and 11 deletions

View File

@ -40,11 +40,11 @@ INLINE_CRIPT
expect(communicator).to receive(:sudo).once.ordered.with(install_backports_if_wheezy_release)
expect(communicator).to receive(:sudo).once.ordered.with("apt-get update -y -qq")
expect(communicator).to receive(:sudo).once.ordered.with("apt-get install -y -qq ansible")
expect(communicator).to receive(:sudo).once.ordered.with("DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" ansible")
subject.ansible_install(machine, :default, "", "", "")
end
end
end
end
end

View File

@ -31,11 +31,11 @@ describe VagrantPlugins::Ansible::Cap::Guest::FreeBSD::AnsibleInstall do
describe "when install_mode is :default (or unknown)" do
it "installs ansible with 'pkg' package manager" do
expect(communicator).to receive(:sudo).with("yes | pkg install ansible")
expect(communicator).to receive(:sudo).with("pkg install -qy py36-ansible")
subject.ansible_install(machine, :default, "", "", "")
end
end
end
end
end

View File

@ -33,7 +33,7 @@ shared_examples_for "Ansible setup via pip on Debian-based systems" do
expect(communicator).to receive(:sudo).once.ordered.
with("apt-get update -y -qq")
expect(communicator).to receive(:sudo).once.ordered.
with("apt-get install -y -qq build-essential curl git libssl-dev libffi-dev python-dev")
with("DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev")
expect(communicator).to receive(:sudo).once.ordered.
with("pip install --upgrade ansible")
@ -44,7 +44,7 @@ shared_examples_for "Ansible setup via pip on Debian-based systems" do
expect(communicator).to receive(:sudo).once.ordered.
with("apt-get update -y -qq")
expect(communicator).to receive(:sudo).once.ordered.
with("apt-get install -y -qq build-essential curl git libssl-dev libffi-dev python-dev")
with("DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev")
expect(communicator).to receive(:sudo).once.ordered.
with("pip install")
@ -65,4 +65,4 @@ shared_examples_for "Ansible setup via pip is not implemented" do
end
end
end
end

View File

@ -42,13 +42,13 @@ describe VagrantPlugins::Ansible::Cap::Guest::Ubuntu::AnsibleInstall do
expect(communicator).to receive(:sudo).once.ordered.
with("""
apt-get update -y -qq && \
apt-get install -y -qq software-properties-common
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq software-properties-common --option \"Dpkg::Options::=--force-confold\"
""")
expect(communicator).to receive(:sudo).once.ordered.
with("""
add-apt-repository ppa:ansible/ansible -y && \
apt-get update -y -qq && \
apt-get install -y -qq ansible
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ansible --option \"Dpkg::Options::=--force-confold\"
""")
subject.ansible_install(machine, :default, "", "", "")
@ -62,7 +62,7 @@ describe VagrantPlugins::Ansible::Cap::Guest::Ubuntu::AnsibleInstall do
with("""
add-apt-repository ppa:ansible/ansible -y && \
apt-get update -y -qq && \
apt-get install -y -qq ansible
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ansible --option \"Dpkg::Options::=--force-confold\"
""")
subject.ansible_install(machine, :default, "", "", "")
@ -73,4 +73,4 @@ describe VagrantPlugins::Ansible::Cap::Guest::Ubuntu::AnsibleInstall do
end
end
end
end