diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-03-18 18:48:46 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | d8e1b272ec321d5f86558672252de60983751a15 (patch) | |
| tree | 45f4797b3512127b9f4c4400fb444f96bd3e80b9 /spec/unit/indirector/run | |
| parent | 1603f7363728dc41f67cd189ca0dcbf074ec44b4 (diff) | |
| download | puppet-d8e1b272ec321d5f86558672252de60983751a15.tar.gz puppet-d8e1b272ec321d5f86558672252de60983751a15.tar.xz puppet-d8e1b272ec321d5f86558672252de60983751a15.zip | |
Feature #3394 REST runner, execution
puppetrun uses REST to trigger puppet runs.
Diffstat (limited to 'spec/unit/indirector/run')
| -rw-r--r-- | spec/unit/indirector/run/local.rb | 20 | ||||
| -rwxr-xr-x | spec/unit/indirector/run/rest.rb | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/spec/unit/indirector/run/local.rb b/spec/unit/indirector/run/local.rb new file mode 100644 index 000000000..face61d5c --- /dev/null +++ b/spec/unit/indirector/run/local.rb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../../../spec_helper' + +require 'puppet/indirector/run/local' + +describe Puppet::Run::Local do + it "should be a sublcass of Puppet::Indirector::Code" do + Puppet::Run::Local.superclass.should equal(Puppet::Indirector::Code) + end + + it "should call runner.run on save and return the runner" do + runner = Puppet::Run.new + runner.stubs(:run).returns(runner) + + request = Puppet::Indirector::Request.new(:indirection, :save, "anything") + request.instance = runner = Puppet::Run.new + Puppet::Run::Local.new.save(request).should == runner + end +end diff --git a/spec/unit/indirector/run/rest.rb b/spec/unit/indirector/run/rest.rb index e07fe7fc2..ee976ed9f 100755 --- a/spec/unit/indirector/run/rest.rb +++ b/spec/unit/indirector/run/rest.rb @@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' -require 'puppet/indirector/runner/rest' +require 'puppet/indirector/run/rest' describe Puppet::Run::Rest do it "should be a sublcass of Puppet::Indirector::REST" do |
