Add pending spec for subnet ping code
This commit is contained in:
parent
0f618a008e
commit
5f8c3955a5
1 changed files with 16 additions and 11 deletions
|
@ -125,22 +125,27 @@ describe Vagrant::LXC::Container do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'assigned ip' do
|
describe 'assigned ip' do
|
||||||
# This ip is set on the sample-arp-output based on mac address from sample-config
|
# This ip is set on the sample-arp-output fixture based on mac address from
|
||||||
|
# sample-config fixture
|
||||||
let(:ip) { "10.0.3.30" }
|
let(:ip) { "10.0.3.30" }
|
||||||
let(:conf_file_contents) { File.read('spec/fixtures/sample-config') }
|
let(:conf_file_contents) { File.read('spec/fixtures/sample-config') }
|
||||||
let(:name) { 'random-container-name' }
|
let(:name) { 'random-container-name' }
|
||||||
|
|
||||||
before do
|
context 'when container mac address gets returned from the first `arp` call' do
|
||||||
@arp_output = File.read('spec/fixtures/sample-arp-output')
|
before do
|
||||||
subject.stub(:raw) {
|
@arp_output = File.read('spec/fixtures/sample-arp-output')
|
||||||
mock(stdout: "#{@arp_output}\n", exit_code: 0)
|
subject.stub(:raw) {
|
||||||
}
|
mock(stdout: "#{@arp_output}\n", exit_code: 0)
|
||||||
File.stub(read: conf_file_contents)
|
}
|
||||||
|
File.stub(read: conf_file_contents)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'gets parsed from `arp` based on lxc mac address' do
|
||||||
|
subject.assigned_ip.should == ip
|
||||||
|
subject.should have_received(:raw).with('arp', '-n')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'gets parsed from `arp` based on lxc mac address' do
|
pending 'when mac address is not returned from an `arp` call'
|
||||||
subject.assigned_ip.should == ip
|
|
||||||
subject.should have_received(:raw).with('arp', '-n')
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue