File tree 3 files changed +13
-0
lines changed 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ def load_stacks(stacks)
112
112
stacks . each do |region , stacks_for_region |
113
113
region = Utils . underscore_to_hyphen ( region )
114
114
stacks_for_region . each do |stack_name , attributes |
115
+ raise ConfigParseError . new ( "Entry for stack #{ stack_name } has no attributes" ) if attributes . nil?
116
+
115
117
stack_name = Utils . underscore_to_hyphen ( stack_name )
116
118
stack_attributes = build_stack_defaults ( region ) . deeper_merge! ( attributes ) . merge (
117
119
'region' => region ,
Original file line number Diff line number Diff line change
1
+ stacks :
2
+ us-east-1 :
3
+ myapp_vpc :
4
+ template : myapp_vpc.json
Original file line number Diff line number Diff line change 35
35
end
36
36
end
37
37
38
+ it "gives explicit error on badly indented entries" do
39
+ Dir . chdir ( './spec/fixtures/' ) do
40
+ expect { StackMaster ::Config . load! ( 'stack_master_wrong_indent.yml' ) }
41
+ . to raise_error StackMaster ::Config ::ConfigParseError
42
+ end
43
+ end
44
+
38
45
it "searches up the tree for stack master yaml" do
39
46
begin
40
47
orig_dir = Dir . pwd
You can’t perform that action at this time.
0 commit comments