Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[CHEF-3010] - The deploy and deploy_revision resources have inconsistent behavior #262

Closed
wants to merge 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 6, 2012
  1. @iafonov
This page is out of date. Refresh to see the latest.
View
2  chef/lib/chef/provider/deploy.rb
@@ -42,6 +42,7 @@ def initialize(new_resource, run_context)
end
def load_current_resource
+ @scm_provider.load_current_resource
@release_path = @new_resource.deploy_to + "/releases/#{release_slug}"
end
@@ -205,7 +206,6 @@ def all_releases
end
def update_cached_repo
- @scm_provider.load_current_resource
if @new_resource.svn_force_export
svn_force_export
else
View
6 chef/spec/unit/provider/deploy_spec.rb
@@ -32,6 +32,11 @@
@provider.stub!(:release_path).and_return(@expected_release_dir)
end
+ it "loads scm resource" do
+ @provider.scm_provider.should_receive(:load_current_resource)
+ @provider.load_current_resource
+ end
+
it "supports :deploy and :rollback actions" do
@provider.should respond_to(:action_deploy)
@provider.should respond_to(:action_rollback)
@@ -239,7 +244,6 @@
end
it "syncs the cached copy of the repo" do
- @provider.scm_provider.should_receive(:load_current_resource)
@provider.scm_provider.should_receive(:action_sync)
@provider.update_cached_repo
end
Something went wrong with that request. Please try again.