Skip to content

Commit

Permalink
Stub docker command to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 committed Aug 29, 2024
1 parent baf7a7a commit 43cb183
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/integration/main_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ class MainTest < IntegrationTest

assert_app_is_down

kamal :deploy
mock = Minitest::Mock.new
mock.expect(:manifest, false, [ first_version ])
mock.expect(:installed?, true)
mock.expect(:running?, true)
Kamal::Commands::Docker.stub(:new, mock) do
kamal :deploy
end
assert_app_is_up version: first_version
assert_hooks_ran "pre-connect", "pre-deploy", "post-deploy"
assert_hooks_ran "pre-connect", "pre-build", "pre-deploy", "post-deploy"
assert_envs version: first_version

second_version = update_app_rev
Expand Down

0 comments on commit 43cb183

Please sign in to comment.