diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-12 17:36:14 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-12 17:36:14 +0000 |
| commit | 26f18a2ae5ca7e4447a80c5ae59df756e77ea6f9 (patch) | |
| tree | 88aef520528bf7d9a09fae45b065e25b2206e28a /test/executables | |
| parent | c3961ae175ee201df27a746d75ee9062050356f5 (diff) | |
| download | puppet-26f18a2ae5ca7e4447a80c5ae59df756e77ea6f9.tar.gz puppet-26f18a2ae5ca7e4447a80c5ae59df756e77ea6f9.tar.xz puppet-26f18a2ae5ca7e4447a80c5ae59df756e77ea6f9.zip | |
Fixing puppetca so it does not call chuser; instead, it is configured to create all of the files with the correct permissions and ownership (using Config#write and Config#writesub).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1111 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/executables')
| -rwxr-xr-x | test/executables/puppetca.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/executables/puppetca.rb b/test/executables/puppetca.rb index 67df0a6b6..a38296a54 100755 --- a/test/executables/puppetca.rb +++ b/test/executables/puppetca.rb @@ -25,7 +25,7 @@ class TestPuppetCA < Test::Unit::TestCase end def runca(args) - return %x{puppetca --confdir=#{Puppet[:confdir]} --user #{Process.uid} --group #{Process.gid} #{args} 2>&1} + return %x{puppetca --confdir=#{Puppet[:confdir]} #{args} 2>&1} end @@ -60,8 +60,17 @@ class TestPuppetCA < Test::Unit::TestCase assert_nothing_raised { output = runca("--sign -a").chomp.split("\n") } + + assert_equal($?,0) assert_equal(["Signed host.test.com"], output) + + signedfile = File.join(Puppet[:signeddir], "host.test.com.pem") + assert(FileTest.exists?(signedfile), "cert does not exist") + assert(! FileTest.executable?(signedfile), "cert is executable") + if Process.uid == 0 + assert(! FileTest.owned?(signedfile), "cert is owned by root") + end assert_nothing_raised { output = runca("--list").chomp.split("\n") } |
