Added service command to alt guest test.

This commit is contained in:
Ladar Levison 2019-08-27 21:07:58 +05:30
parent 7e4c4cd71a
commit 243ae0f368
1 changed files with 2 additions and 0 deletions

View File

@ -24,10 +24,12 @@ describe "VagrantPlugins::GuestALT::Cap::ChangeHostName" do
let(:systemd) { true } let(:systemd) { true }
let(:hostnamectl) { true } let(:hostnamectl) { true }
let(:networkd) { true } let(:networkd) { true }
let(:service) { true }
let(:network_manager) { false } let(:network_manager) { false }
before do before do
allow(cap).to receive(:systemd?).and_return(systemd) allow(cap).to receive(:systemd?).and_return(systemd)
allow(cap).to receive(:service?).and_return(service)
allow(cap).to receive(:hostnamectl?).and_return(hostnamectl) allow(cap).to receive(:hostnamectl?).and_return(hostnamectl)
allow(cap).to receive(:systemd_networkd?).and_return(networkd) allow(cap).to receive(:systemd_networkd?).and_return(networkd)
allow(cap).to receive(:systemd_controlled?).with(anything, /NetworkManager/).and_return(network_manager) allow(cap).to receive(:systemd_controlled?).with(anything, /NetworkManager/).and_return(network_manager)