diff options
author | elijah <elijah@riseup.net> | 2013-05-30 12:19:05 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-05-30 12:19:05 -0700 |
commit | 407282d3730a64c8395e3a05822b49f7e4ce4793 (patch) | |
tree | afccbd440a6b53329f21e0579de529db92a3e59d /lib/leap_cli | |
parent | e8191d25a091eef1e81bc79c61e4867c81e19d0f (diff) |
remove hardcoded environments from test.rb
Diffstat (limited to 'lib/leap_cli')
-rw-r--r-- | lib/leap_cli/commands/test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/test.rb b/lib/leap_cli/commands/test.rb index 79271be..8fe6e11 100644 --- a/lib/leap_cli/commands/test.rb +++ b/lib/leap_cli/commands/test.rb @@ -28,7 +28,8 @@ module LeapCli; module Commands assert_config! 'provider.ca.client_certificates.unlimited_prefix' assert_config! 'provider.ca.client_certificates.limited_prefix' template = read_file! Path.find_file(:test_client_openvpn_template) - ['production', 'testing', 'local', 'development', nil].each do |env| + environments = [nil] + manager.tags.collect {|name, tag| tag['environment']}.compact + environments.each do |env| vpn_nodes = manager.nodes[:environment => env][:services => 'openvpn']['openvpn.allow_limited' => true] if vpn_nodes.any? generate_test_client_cert(provider.ca.client_certificates.limited_prefix) do |key, cert| |