spec/kitchen/provisioner/chef_solo_spec.rb in test-kitchen-1.17.0 vs spec/kitchen/provisioner/chef_solo_spec.rb in test-kitchen-1.18.0
- old
+ new
@@ -96,10 +96,14 @@
describe "solo.rb file" do
let(:file) do
IO.read(sandbox_path("solo.rb")).lines.map(&:chomp)
end
+ let(:file_no_updated_resources) do
+ IO.read(sandbox_path("client_no_updated_resources.rb")).lines.map(&:chomp)
+ end
+
it "creates a solo.rb" do
provisioner.create_sandbox
sandbox_path("solo.rb").file?.must_equal true
end
@@ -272,9 +276,17 @@
}
provisioner.create_sandbox
file.must_include %{foo false}
file.must_include %{bar true}
+ end
+
+ it "supports idempotency check " do
+ config[:multiple_converge] = 2
+ config[:enforce_idempotency] = true
+ provisioner.create_sandbox
+
+ file_no_updated_resources.join.must_match /handler_file =.*chef-client-fail-if-update-handler.rb/
end
end
def sandbox_path(path)
Pathname.new(provisioner.sandbox_path).join(path)