-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make cucumber-nagios features parameterised #17
Comments
Yes please! |
Yes, and it would also align the usage with nagios plugin guidelines, which define the reserved "-H" option, i.e.: $USER7$/bin/cucumber-nagios -H $HOSTADDRESS$ $USER7$/features/dns.feature However, most macros are also provided as environment variables by nagios with a "NAGIOS_"-prefix (http://nagios.sourceforge.net/docs/3_0/macros.html). Given /^a valid nameserver by nagios$/ do var = 'NAGIOS_HOSTADDRESS' nameserver = ENV[var] nameserver.should_not be_blank, "ERROR: environment variable #{var} not set" @resolver = Resolv.new([Resolv::DNS.new(:nameserver => nameserver)]) end HTH, |
this would be a nice feature. |
+1 ... |
This could be provided exposing the HOSTADDRESS as an environment variable. We'll need replacements for at least these steps:
How do these steps sound?
We might implement it in place with a transform, but those can get magical and not in a good way. Then there's the deep task of cuken integration. |
If you want to run the same scenario across multiple hosts, you can write a scenario outline. But what if you don't know the host you want to run it against? What if you want to specify the host on the command line like this:
This would be awesome.
The text was updated successfully, but these errors were encountered: