From e7bc2817664568bcc6965ca530ab87ded86983b9 Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Tue, 2 Feb 2016 15:32:49 -0500 Subject: [PATCH] Add start of line to log level config check regex When checking custom log level config, verify that the config starts the line, and therefore that it's not commented out. Change-Id: I00acfdb3ce432d8d855e202a026b7085315c6bb5 Signed-off-by: Daniel Farrell --- spec/spec_helper.rb | 2 +- spec/spec_helper_acceptance.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 99fd958..c5e927a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -181,7 +181,7 @@ def log_level_tests(options = {}) 'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg', 'owner' => 'odl', 'group' => 'odl', - 'content' => /log4j.logger.#{logger} = #{level}/ + 'content' => /^log4j.logger.#{logger} = #{level}/ ) } end diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 4e21c4d..7823a75 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -269,7 +269,7 @@ def log_level_validations(options = {}) it { should be_file } it { should be_owned_by 'odl' } it { should be_grouped_into 'odl' } - its(:content) { should match /log4j.logger.#{logger} = #{level}/ } + its(:content) { should match /^log4j.logger.#{logger} = #{level}/ } end end end -- 2.36.6