From 27e083151bfd1e167f810ceb38199ded3d8d8be5 Mon Sep 17 00:00:00 2001 From: Daniel Pittman Date: Thu, 21 Apr 2011 15:45:28 -0700 Subject: (#7181) Rename configurer face to secret_agent. This is a much more useful public name, especially given the code is aimed to eventually replace the agent entirely. Until then this is pleasant enough to talk about. Reviewed-By: Nick Lewis --- spec/unit/application/configurer_spec.rb | 32 ------------------------------ spec/unit/application/secret_agent_spec.rb | 32 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-) delete mode 100755 spec/unit/application/configurer_spec.rb create mode 100755 spec/unit/application/secret_agent_spec.rb (limited to 'spec/unit/application') diff --git a/spec/unit/application/configurer_spec.rb b/spec/unit/application/configurer_spec.rb deleted file mode 100755 index 791a367ea..000000000 --- a/spec/unit/application/configurer_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env rspec -require 'spec_helper' -require 'puppet/application/configurer' -require 'puppet/indirector/catalog/rest' -require 'puppet/indirector/report/rest' -require 'tempfile' - -describe "Puppet::Application::Configurer" do - it "should retrieve and apply a catalog and submit a report" do - pending "REVISIT: 2.7 changes broke this, and we want the merge published" - - dirname = Dir.mktmpdir("puppetdir") - Puppet[:vardir] = dirname - Puppet[:confdir] = dirname - Puppet[:certname] = "foo" - @catalog = Puppet::Resource::Catalog.new - @file = Puppet::Resource.new(:file, File.join(dirname, "tmp_dir_resource"), :parameters => {:ensure => :present}) - @catalog.add_resource(@file) - - @report = Puppet::Transaction::Report.new("apply") - Puppet::Transaction::Report.stubs(:new).returns(@report) - - Puppet::Resource::Catalog::Rest.any_instance.stubs(:find).returns(@catalog) - @report.expects(:save) - - Puppet::Util::Log.stubs(:newdestination) - - Puppet::Application::Configurer.new.run - - @report.status.should == "changed" - end -end diff --git a/spec/unit/application/secret_agent_spec.rb b/spec/unit/application/secret_agent_spec.rb new file mode 100755 index 000000000..eba936447 --- /dev/null +++ b/spec/unit/application/secret_agent_spec.rb @@ -0,0 +1,32 @@ +#!/usr/bin/env rspec +require 'spec_helper' +require 'puppet/application/secret_agent' +require 'puppet/indirector/catalog/rest' +require 'puppet/indirector/report/rest' +require 'tempfile' + +describe "Puppet::Application::Secret_agent" do + it "should retrieve and apply a catalog and submit a report" do + pending "REVISIT: 2.7 changes broke this, and we want the merge published" + + dirname = Dir.mktmpdir("puppetdir") + Puppet[:vardir] = dirname + Puppet[:confdir] = dirname + Puppet[:certname] = "foo" + @catalog = Puppet::Resource::Catalog.new + @file = Puppet::Resource.new(:file, File.join(dirname, "tmp_dir_resource"), :parameters => {:ensure => :present}) + @catalog.add_resource(@file) + + @report = Puppet::Transaction::Report.new("apply") + Puppet::Transaction::Report.stubs(:new).returns(@report) + + Puppet::Resource::Catalog::Rest.any_instance.stubs(:find).returns(@catalog) + @report.expects(:save) + + Puppet::Util::Log.stubs(:newdestination) + + Puppet::Application::Secret_agent.new.run + + @report.status.should == "changed" + end +end -- cgit