Use new mock loader, update the command name

Signed-off-by: Miah Johnson <miah@chia-pet.org>
This commit is contained in:
Miah Johnson 2019-10-23 21:41:29 -07:00
parent e357232db1
commit 8e31367b51
2 changed files with 5 additions and 3 deletions

View file

@ -404,7 +404,7 @@ class MockLoader
"/sbin/zpool get -Hp all tank" => cmd.call("zpool-get-all-tank"),
# docker
"4f8e24022ea8b7d3b117041ec32e55d9bf08f11f4065c700e7c1dc606c84fd17" => cmd.call("docker-ps-a"),
"b40ed61c006b54f155b28a85dc944dc0352b30222087b47c6279568ec0e59d05" => cmd.call("df-t"),
"b40ed61c006b54f155b28a85dc944dc0352b30222087b47c6279568ec0e59d05" => cmd.call("df-PT"),
"docker version --format '{{ json . }}'" => cmd.call("docker-version"),
"docker info --format '{{ json . }}'" => cmd.call("docker-info"),
"docker inspect 71b5df59442b" => cmd.call("docker-inspec"),

View file

@ -3,9 +3,11 @@ require "inspec/resource"
require "inspec/resources/filesystem"
describe "Inspec::Resources::FileSystemResource" do
# arch linux
it "verify filesystem on linux" do
resource = MockLoader.new(:ubuntu1404).load_resource("filesystem", "/")
resource = quick_resource(:filesystem, :linux, "/") do |cmd|
stdout_file "test/unit/mock/cmd/df-PT"
end
_(resource.size_kb).must_equal 30428648
_(resource.size).must_equal 30428648
_(resource.name).must_equal "/"