Closed dol closed 9 years ago
Can you detail the code you're using so I can check this.
I thought the re should allow for this already.
Not working:
supervisord::program { 'test':
command => "/bin/echo",
numprocs => 1,
}
Working:
supervisord::program { 'test':
command => "/bin/echo",
numprocs => '1',
}
Strange, I define my define types in hiera and don't have this issue. Also when I change the spec tests to use integers it passes fine.
Either way I've fixed the validation so it checks for integers then does the re check so this shouldn't break existing configurations. See 39509c40e38531c54836e7398a568ea5383d78d7 for the details.
If you could test this that would be great!
Thank you for the fix. I use loadyaml from puppetlabs/stdlib to dynamically create supervisor program resources. This might be create an integer type internally. I'll test the new version and provide feedback soon.
I can confirm that your improvement fixed the issue. Thank you very much.
I found the difference that caused the problem. I used the future parser that handles integers and string differently. This comment on the Puppet Mailinglist reminded me of the problem.
It might be a good idea to add the future parser test to travis by adding FUTURE_PARSER=yes
as environment variable. This is a feature from the puppetlabs_spec_helper
Yeah, I think this is a good idea.
I passed an integer for numprocs into
supervisord::progame
. The validation of validate_re is not able to cast an integer to an string and then perform a regex check. This could be fixed by checking the type withis_integer
first and then perform a regex check.