summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/integration/network/rest_authconfig_spec.rb1
-rwxr-xr-xspec/unit/file_serving/configuration/parser_spec.rb8
-rwxr-xr-xspec/unit/network/authconfig_spec.rb11
3 files changed, 19 insertions, 1 deletions
diff --git a/spec/integration/network/rest_authconfig_spec.rb b/spec/integration/network/rest_authconfig_spec.rb
index 7c50d8970..0e5278860 100644
--- a/spec/integration/network/rest_authconfig_spec.rb
+++ b/spec/integration/network/rest_authconfig_spec.rb
@@ -125,7 +125,6 @@ describe Puppet::Network::RestAuthConfig do
end
it "should support inlined comments" do
- pending('bug #6026')
add_rule('allow host.domain.com # will it work?')
@auth.should allow(request)
diff --git a/spec/unit/file_serving/configuration/parser_spec.rb b/spec/unit/file_serving/configuration/parser_spec.rb
index 3d6b3e234..5ccfc5075 100755
--- a/spec/unit/file_serving/configuration/parser_spec.rb
+++ b/spec/unit/file_serving/configuration/parser_spec.rb
@@ -118,6 +118,14 @@ describe Puppet::FileServing::Configuration::Parser do
@parser.parse
end
+ it "should support inline comments" do
+ mock_file_content "[one]\nallow something \# will it work?\n"
+
+ @mount.expects(:info)
+ @mount.expects(:allow).with("something")
+ @parser.parse
+ end
+
it "should tell the mount to deny any deny values from the section" do
mock_file_content "[one]\ndeny something\n"
diff --git a/spec/unit/network/authconfig_spec.rb b/spec/unit/network/authconfig_spec.rb
index f33de7872..ca94cc1ab 100755
--- a/spec/unit/network/authconfig_spec.rb
+++ b/spec/unit/network/authconfig_spec.rb
@@ -196,6 +196,17 @@ describe Puppet::Network::AuthConfig do
@authconfig.read
end
+ it "should allow ACE inline comments" do
+ acl = stub 'acl', :info
+
+ @fd.stubs(:each).multiple_yields('[puppetca]', ' allow 127.0.0.1 # will it work?')
+ @rights.stubs(:newright).with("[puppetca]", 1, 'dummy').returns(acl)
+
+ acl.expects(:allow).with('127.0.0.1')
+
+ @authconfig.read
+ end
+
it "should create an allow ACE on each subsequent allow" do
acl = stub 'acl', :info