Bug #9257
Test suite fails to run if local.yml is empty
100%
Description
With an empty local.yml
I see:
# ./run_test_suite --iso ../tails-i386-1.3.2.iso -- features/tor_bridges.feature
Virtual X framebuffer started on display :0
no implicit conversion of false into Hash (TypeError)
/srv/git/features/support/config.rb:18:in `merge!'
/srv/git/features/support/config.rb:18:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/cucumber/rb_support/rb_language.rb:95:in `load'
/usr/lib/ruby/vendor_ruby/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
/usr/lib/ruby/vendor_ruby/cucumber/runtime/support_code.rb:180:in `load_file'
/usr/lib/ruby/vendor_ruby/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/usr/lib/ruby/vendor_ruby/cucumber/runtime/support_code.rb:82:in `each'
/usr/lib/ruby/vendor_ruby/cucumber/runtime/support_code.rb:82:in `load_files!'
/usr/lib/ruby/vendor_ruby/cucumber/runtime.rb:184:in `load_step_definitions'
/usr/lib/ruby/vendor_ruby/cucumber/runtime.rb:42:in `run!'
/usr/lib/ruby/vendor_ruby/cucumber/cli/main.rb:42:in `execute!'
/usr/bin/cucumber:13:in `<main>'
Subtasks
History
#1 Updated by intrigeri 2015-04-17 17:17:58
(Assigned to anonym since that’s a bug we missed when merging Feature #8188, and setting target version to 1.4 since I guess others will be hit by that bug when they split their local.yml
into local.d/*.yml
like I just did.
#2 Updated by anonym 2015-04-18 00:00:16
- Status changed from Confirmed to In Progress
Applied in changeset commit:b2e9259f8ea434a1142092391529e77c7a86680c.
#3 Updated by anonym 2015-04-18 00:01:10
- Assignee changed from anonym to kytv
- % Done changed from 0 to 50
- QA Check set to Ready for QA
- Feature Branch set to bugfix/9257-allow-empty-local-configs
#4 Updated by kytv 2015-04-19 16:25:44
- Assignee changed from kytv to anonym
- QA Check changed from Ready for QA to Dev Needed
With this branch I get the following:
# ./run_test_suite --view --iso tails-i386-bugfix_9233-seahorse-1.4-20150415.iso --keep-snapshots --tmpdir ./tmp -- features/tor_bridges.feature
Virtual X framebuffer started on display :1
VNC server running on: localhost:5902
/home/kytv/git/tails/features/support/config.rb:15: syntax error, unexpected keyword_or, expecting ')'
$config.merge!(YAML.load(File.read(config)) or {})
^
/home/kytv/git/tails/features/support/config.rb:18: syntax error, unexpected keyword_or, expecting ')'
$config.merge!(YAML.load(File.read(LOCAL_CONFIG_FILE)) or {})
^
/home/kytv/git/tails/features/support/config.rb:64: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)
/usr/lib/ruby/vendor_ruby/cucumber/rb_support/rb_language.rb:95:in `load'
/usr/lib/ruby/vendor_ruby/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
/usr/lib/ruby/vendor_ruby/cucumber/runtime/support_code.rb:180:in `load_file'
/usr/lib/ruby/vendor_ruby/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/usr/lib/ruby/vendor_ruby/cucumber/runtime/support_code.rb:82:in `each'
/usr/lib/ruby/vendor_ruby/cucumber/runtime/support_code.rb:82:in `load_files!'
/usr/lib/ruby/vendor_ruby/cucumber/runtime.rb:184:in `load_step_definitions'
/usr/lib/ruby/vendor_ruby/cucumber/runtime.rb:42:in `run!'
/usr/lib/ruby/vendor_ruby/cucumber/cli/main.rb:42:in `execute!'
/usr/bin/cucumber:13:in `<main>'
#5 Updated by kytv 2015-04-19 17:21:09
This seems to work (putting the or
in its own set of parentheses)
diff --git a/features/support/config.rb b/features/support/config.rb
index 8edce9a..d7aacb7 100644
--- a/features/support/config.rb
+++ b/features/support/config.rb
@@ -12,10 +12,10 @@ LOCAL_CONFIGS_DIR = "#{Dir.pwd}/features/config/local.d"
assert File.exists?(DEFAULTS_CONFIG_FILE)
$config = YAML.load(File.read(DEFAULTS_CONFIG_FILE))
Dir.glob("#{LOCAL_CONFIGS_DIR}/*.yml").sort.each do |config|
- $config.merge!(YAML.load(File.read(config)) or {})
+ $config.merge!((YAML.load(File.read(config)) or {}))
end
if File.exists?(LOCAL_CONFIG_FILE)
- $config.merge!(YAML.load(File.read(LOCAL_CONFIG_FILE)) or {})
+ $config.merge!((YAML.load(File.read(LOCAL_CONFIG_FILE)) or {}))
end
# Options passed to the `run_test_suite` script will always take
# precedence. The way we import these keys is only safe for values
#6 Updated by anonym 2015-04-20 09:44:26
Applied in changeset commit:932ee688ad19747ebbc53f91aa18a2427e7dc81d.
#7 Updated by anonym 2015-04-20 09:49:23
- Assignee changed from anonym to kytv
- QA Check changed from Dev Needed to Ready for QA
I force pushed a much improved version of this branch.
#8 Updated by kytv 2015-04-20 17:07:49
- Assignee changed from kytv to intrigeri
anonym wrote:
> I force pushed a much improved version of this branch.
Yes, MUCH improved. :)
Review looks good and testing passes.
/me slides it onto intrigeri's plate
#9 Updated by intrigeri 2015-04-21 01:40:50
- Status changed from In Progress to Fix committed
- % Done changed from 50 to 100
Applied in changeset commit:a17cbb6e6785bd4555aaa7a9eccb74bd059b3637.
#10 Updated by intrigeri 2015-04-21 01:44:25
- Assignee deleted (
intrigeri) - QA Check changed from Ready for QA to Pass
Yay!
#11 Updated by kytv 2015-04-28 12:12:18
- Status changed from Fix committed to In Progress
Applied in changeset commit:716db3f915c42342c34f77ffdbd1e90591457791.
#12 Updated by intrigeri 2015-04-29 08:01:21
- Status changed from In Progress to Fix committed
#13 Updated by BitingBird 2015-05-12 18:37:43
- Status changed from Fix committed to Resolved