Wait for healthy containers in integration test
Rather than waiting 5 seconds and hoping for the best after we boot docker compose, add docker healthchecks and wait for all the containers to be healthy.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
require "bundler/setup"
|
||||
require "active_support/test_case"
|
||||
require "active_support/testing/autorun"
|
||||
require "active_support/testing/stream"
|
||||
require "debug"
|
||||
require "mocha/minitest" # using #stubs that can alter returns
|
||||
require "minitest/autorun" # using #stub that take args
|
||||
@@ -23,4 +24,14 @@ module SSHKit
|
||||
end
|
||||
|
||||
class ActiveSupport::TestCase
|
||||
include ActiveSupport::Testing::Stream
|
||||
|
||||
private
|
||||
def stdouted
|
||||
capture(:stdout) { yield }.strip
|
||||
end
|
||||
|
||||
def stderred
|
||||
capture(:stderr) { yield }.strip
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user