On Mon, August 25, 2008 16:46, Luke Kanies wrote:
>
> On Aug 25, 2008, at 6:24 AM, Brice Figureau wrote:
>
>> OK, I had a look to those.
>> I have some questions:
>> * should I implement both tests (ie in ral and Rspec)? or Rspec is
>> enough?
>
> As James says, only rspec -- we just haven't had a chance to migrate
> the old tests.

I started writing a rspec test for the daemontools service, but anyhow I
can't seem to be able to create temp dirs (or file) using
PuppetTest::tempfile.

Here is the snippet code:
describe provider_class do
    include PuppetTest
    before(:all) do

        @servicedir = tempfile()
        Dir.mkdir(@servicedir)
        @daemondir = tempfile()
        Dir.mkdir(@daemondir)
        Dir.mkdir(File.join(@daemondir,"myservice"))
    end
...

It is failing in PuppetTest::setup when it tries to mkdir the temp dir that
will host all other temp files:
1)
Errno::ENOENT in 'Puppet::Type::Service::ProviderDaemontools should have a
start method'
No such file or directory - /private/tmp/puppettesting1677/configdir1
/Users/brice/devl/puppet/spec/../test/lib/puppettest.rb:193:in `mkdir'
/Users/brice/devl/puppet/spec/../test/lib/puppettest.rb:193:in `setup'
/Users/brice/devl/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:19:in
`run'
/Users/brice/devl/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
`each'
/Users/brice/devl/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
`run'
unit/provider/service/daemontools.rb:7:

The /private/tmp/puppettesting1677 dir seems to be created fine earlier in
PuppetTest::tempdir.

Any idea?
(and sorry for sending so many (maybe dumb) questions on the list)
-- 
Brice Figureau
Days of Wonder


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to