forked from hunner/puppetlabs-sudo
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dan Bode
committed
Oct 11, 2010
1 parent
befb480
commit 350a018
Showing
8 changed files
with
96 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
require 'pathname'; Pathname.new(__FILE__).realpath.ascend { |x| begin; require (x + 'spec_helper.rb'); break; rescue LoadError; end } | ||
|
||
#describe_provider :sudoers, :parsed, :resource => {:path => '/tmp/vcsrepo'} do | ||
describe Puppet::Type.type(:sudoers).provider(:parsed) do | ||
before(:each) do | ||
@provider = Puppet::Type.type(:sudoers).provider(:parsed) | ||
end | ||
it 'should not be null' do | ||
@provider.should_not be_nil | ||
end | ||
|
||
describe 'setup' do | ||
it 'should fail if visudo is not in path' do | ||
ENV['PATH']='' | ||
@provider = Puppet::Type.type(:sudoers).provider(:parsed) | ||
end | ||
it 'should work if visudo is in path' do | ||
end | ||
end | ||
|
||
# context "parsing lines" do | ||
# context "should ignore empty lines" do | ||
# | ||
# end | ||
# context "should ignore comment lines" do | ||
# | ||
# end | ||
# context "parsing invalid lines" do | ||
# | ||
# end | ||
# context "parsing alias lines" do | ||
# | ||
# end | ||
# context "parsing user spec lines" do | ||
# context "prefetch comment NAMEVAR lines for user spec" | ||
# end | ||
# end | ||
# context "parsing defaults lines" do | ||
# | ||
# end | ||
# end | ||
# | ||
# context "dissallow type changes" do | ||
# # not sure if this requires a type | ||
# end | ||
# | ||
# | ||
# context "Writing lines" do | ||
# context "write comment lines" do | ||
# | ||
# end | ||
# context "write blank lines" do | ||
# | ||
# end | ||
# context "write user alias lines" do | ||
# | ||
# end | ||
# context "write user spec lines" do | ||
# | ||
# end | ||
# context "write defaults lines" do | ||
# | ||
# end | ||
# context "fail for invalid types" do | ||
# | ||
# end | ||
# context "fail for invalid lines" do | ||
# | ||
# end | ||
# end | ||
end | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
resources { 'sudoers': | ||
purge => true, | ||
} | ||
sudoers{'fake_namevar_23': | ||
ensure => present, | ||
users => ['dan1', 'dan2'], | ||
hosts => 'ALL', | ||
commands => [ | ||
'(root) /usr/bin/su - easapp', | ||
'(easapp)/usr/local/eas-ts/bin/appctl', | ||
], | ||
type => 'user_spec', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters