diff options
| author | Luke Kanies <luke@madstop.com> | 2008-11-25 18:14:40 -0600 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2008-11-26 12:57:53 +1100 |
| commit | 78bced1de85c268a89d3c2f44e84ea50d31c775c (patch) | |
| tree | 0ccf4f00ceb31dca8605ef53a0ef0bb4a8fce966 /test/util | |
| parent | 83cebb56126646ce3e16e70e473f8b4c062c432a (diff) | |
| download | puppet-78bced1de85c268a89d3c2f44e84ea50d31c775c.tar.gz puppet-78bced1de85c268a89d3c2f44e84ea50d31c775c.tar.xz puppet-78bced1de85c268a89d3c2f44e84ea50d31c775c.zip | |
Fixing #1683 - accessing and changing settings is now thread-safe.
Applying patch by Matt Palmer.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test/util')
| -rwxr-xr-x | test/util/settings.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/util/settings.rb b/test/util/settings.rb index cf5dca76d..b6097c4c9 100755 --- a/test/util/settings.rb +++ b/test/util/settings.rb @@ -1058,12 +1058,12 @@ yay = /a/path def test_celement_short_name element = nil assert_nothing_raised("Could not create celement") do - element = CElement.new :short => "n", :desc => "anything" + element = CElement.new :short => "n", :desc => "anything", :settings => Puppet::Util::Settings.new end assert_equal("n", element.short, "Short value is not retained") assert_raise(ArgumentError,"Allowed multicharactered short names.") do - element = CElement.new :short => "no", :desc => "anything" + element = CElement.new :short => "no", :desc => "anything", :settings => Puppet::Util::Settings.new end end @@ -1088,13 +1088,13 @@ yay = /a/path # Tell getopt which arguments are valid def test_get_getopt_args - element = CElement.new :name => "foo", :desc => "anything" + element = CElement.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") element.short = "n" assert_equal([["--foo", "-n", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") - element = CBoolean.new :name => "foo", :desc => "anything" + element = CBoolean.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::NO_ARGUMENT], ["--no-foo", GetoptLong::NO_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") |
