BSD host properly tests for `nfsd` binary
This commit is contained in:
parent
ba78ea86c1
commit
e158a01d69
|
@ -5,8 +5,8 @@ module Vagrant
|
||||||
include Util
|
include Util
|
||||||
|
|
||||||
def nfs?
|
def nfs?
|
||||||
# TODO: verify it exists
|
system("which nfsd")
|
||||||
true
|
$?.to_i == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
def nfs_export(ip, folders)
|
def nfs_export(ip, folders)
|
||||||
|
|
|
@ -10,8 +10,22 @@ class BSDHostTest < Test::Unit::TestCase
|
||||||
|
|
||||||
context "supporting nfs check" do
|
context "supporting nfs check" do
|
||||||
should "support NFS" do
|
should "support NFS" do
|
||||||
|
@instance.expects(:system).with() do |cmd|
|
||||||
|
`which which`
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
assert @instance.nfs?
|
assert @instance.nfs?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "not support NFS if nfsd is not found" do
|
||||||
|
@instance.expects(:system).with() do |cmd|
|
||||||
|
`which thisshouldnoteverneverexist`
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
|
assert !@instance.nfs?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "nfs export" do
|
context "nfs export" do
|
||||||
|
|
Loading…
Reference in New Issue