@@ -53,17 +53,16 @@ class CliMainTest < CliTestCase
5353 Kamal ::Cli ::Main . any_instance . expects ( :invoke ) . with ( "kamal:cli:prune:all" , [ ] , invoke_options )
5454
5555 Kamal ::Commands ::Hook . any_instance . stubs ( :hook_exists? ) . returns ( true )
56- hook_variables = { version : 999 , service_version : "app@999" , hosts : "1.1.1.1,1.1.1.2" , command : "deploy" }
5756
5857 run_command ( "deploy" , "--verbose" ) . tap do |output |
59- assert_hook_ran "pre-connect" , output , ** hook_variables
58+ assert_hook_ran "pre-connect" , output
6059 assert_match /Log into image registry/ , output
6160 assert_match /Build and push app image/ , output
62- assert_hook_ran "pre-deploy" , output , ** hook_variables , secrets : true
61+ assert_hook_ran "pre-deploy" , output
6362 assert_match /Ensure kamal-proxy is running/ , output
6463 assert_match /Detect stale containers/ , output
6564 assert_match /Prune old containers and images/ , output
66- assert_hook_ran "post-deploy" , output , ** hook_variables , runtime : true , secrets : true
65+ assert_hook_ran "post-deploy" , output
6766 end
6867 end
6968 end
@@ -205,14 +204,12 @@ class CliMainTest < CliTestCase
205204
206205 Kamal ::Commands ::Hook . any_instance . stubs ( :hook_exists? ) . returns ( true )
207206
208- hook_variables = { version : 999 , service_version : "app@999" , hosts : "1.1.1.1,1.1.1.2" , command : "redeploy" }
209-
210207 run_command ( "redeploy" , "--verbose" ) . tap do |output |
211- assert_hook_ran "pre-connect" , output , ** hook_variables
208+ assert_hook_ran "pre-connect" , output
212209 assert_match /Build and push app image/ , output
213- assert_hook_ran "pre-deploy" , output , ** hook_variables
210+ assert_hook_ran "pre-deploy" , output
214211 assert_match /Running the pre-deploy hook.../ , output
215- assert_hook_ran "post-deploy" , output , ** hook_variables , runtime : true
212+ assert_hook_ran "post-deploy" , output
216213 end
217214 end
218215
@@ -258,14 +255,13 @@ class CliMainTest < CliTestCase
258255 . returns ( "running" ) . at_least_once # health check
259256
260257 Kamal ::Commands ::Hook . any_instance . stubs ( :hook_exists? ) . returns ( true )
261- hook_variables = { version : 123 , service_version : "app@123" , hosts : "1.1.1.1,1.1.1.2,1.1.1.3,1.1.1.4" , command : "rollback" }
262258
263259 run_command ( "rollback" , "--verbose" , "123" , config_file : "deploy_with_accessories" ) . tap do |output |
264- assert_hook_ran "pre-deploy" , output , ** hook_variables
260+ assert_hook_ran "pre-deploy" , output
265261 assert_match "docker tag dhh/app:123 dhh/app:latest" , output
266262 assert_match "docker run --detach --restart unless-stopped --name app-web-123" , output
267263 assert_match "docker container ls --all --filter name=^app-web-version-to-rollback$ --quiet | xargs docker stop" , output , "Should stop the container that was previously running"
268- assert_hook_ran "post-deploy" , output , ** hook_variables , runtime : true
264+ assert_hook_ran "post-deploy" , output
269265 end
270266 end
271267
0 commit comments