diff --git a/lib/kitchen/instance.rb b/lib/kitchen/instance.rb index b4ad60cc9..761a2fe8d 100644 --- a/lib/kitchen/instance.rb +++ b/lib/kitchen/instance.rb @@ -405,6 +405,7 @@ def converge_action if legacy_ssh_base_driver? legacy_ssh_base_converge(state) else + provisioner.check_license provisioner.call(state) end end diff --git a/lib/kitchen/provisioner/base.rb b/lib/kitchen/provisioner/base.rb index 15126b1ec..ad9b70c28 100644 --- a/lib/kitchen/provisioner/base.rb +++ b/lib/kitchen/provisioner/base.rb @@ -68,7 +68,6 @@ def initialize(config = {}) # @raise [ActionFailed] if the action could not be completed # rubocop:disable Metrics/AbcSize def call(state) - check_license create_sandbox sandbox_dirs = Util.list_directory(sandbox_path) diff --git a/spec/kitchen/instance_spec.rb b/spec/kitchen/instance_spec.rb index 5325eaea9..c7ec10730 100644 --- a/spec/kitchen/instance_spec.rb +++ b/spec/kitchen/instance_spec.rb @@ -509,6 +509,7 @@ def platform(name = "platform") describe "with no state" do it "calls Driver#create and Provisioner#call with empty state hash" do driver.expects(:create).with({}) + provisioner.expects(:check_license) provisioner.expects(:call) .with { |state| state[:last_action] == "create" } diff --git a/spec/kitchen/provisioner/base_spec.rb b/spec/kitchen/provisioner/base_spec.rb index db806d6cb..8c8e06f2b 100644 --- a/spec/kitchen/provisioner/base_spec.rb +++ b/spec/kitchen/provisioner/base_spec.rb @@ -163,12 +163,6 @@ def sandbox_path FakeFS::FileSystem.clear end - it "checks the license" do - provisioner.expects(:check_license) - - cmd - end - it "creates the sandbox" do provisioner.expects(:create_sandbox)