File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -198,10 +198,37 @@ Feature: Running A Deploy Hook
198198 | before_restart |
199199 | after_restart |
200200 | after_deploy |
201- #Scenario: Running a callback with both service hooks and deploy hooks
201+
202+
203+ Scenario Outline : Executable hooks without the executable bit get skipped
204+ Given my app has a <Callback Name> executable deploy hook
205+ But my app's <Callback Name> executable deploy hook is not actually executable
206+ And I have a service named selective
207+ Given my service has a <Callback Name> executable hook
208+ When I run the <Callback Name> callback
209+ Then the <Callback Name> executable hook for my service is executed
210+ But the <Callback Name> executable deploy hook is not executed
211+
212+ Examples :
213+ | Callback Name |
214+ | before_deploy |
215+ | before_bundle |
216+ | after_bundle |
217+ | before_compile_assets |
218+ | after_compile_assets |
219+ | before_migrate |
220+ | after_migrate |
221+ | before_symlink |
222+ | after_symlink |
223+ | before_restart |
224+ | after_restart |
225+ | after_deploy |
202226
203227 #@failure
204228 #Scenario: Ruby hooks with syntax errors cause an error
205229
230+ #@failure
231+ #Scenario: Ruby hook errors cause an error
232+
206233 #@failure
207234 #Scenario: Executable hooks that are not actually executable cause an error
Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ def service_name
140140 to eql ( false )
141141end
142142
143+ Given %r{^my app's (.+) executable deploy hook is not actually executable$} do |callback_name |
144+ hook = deploy_hooks_path . join ( callback_name )
145+
146+ hook . chmod ( 0644 )
147+ end
148+
143149Then %{I see the output} do
144150 puts "OUTPUT START\n \n #{ output_text } \n \n OUTPUT END"
145151end
You can’t perform that action at this time.
0 commit comments