Hi,
I am attempting to write spec tests for a trac module I'm working on that
has several dependencies, one of which is puppetlabs-postgresql. I am
running into an issue with my spec tests as the puppet code fails to
compile because it can't' find the classes/defined types/functions from my
calls out to other modules.
So, for example, this particular bit of code throws the error: Could not
find class postgresql::server
define trac::db($db_user,
$db_pass,
$db_name) {
include 'postgresql::server'
postgresql::server::db {$db_name:
user => $db_user,
password => postgresql_password($db_user, $db_pass),
}
if ( ! defined(Postgresql::Server::Role[$db_user])) {
postgresql::server::role {$db_user:
password_hash => postgresql_password($db_user, $db_pass)
}
}
}
I also have dependencies on apache. So, in the define I do want to test,
trac::project, I find myself doing things like this:
let(:pre_condition) {
"class apache {}
define apache::mod() {}
define trac::db() {}
"
}
Is there a more sane way of doing this? Is my thinking completely off? Any
help is appreciated.
Thanks,
John
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/f05a050a-a614-4d15-bf9c-1f3ae541770c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.