Set DEBUG for integration test output
This commit is contained in:
@@ -321,7 +321,7 @@ class CliBuildTest < CliTestCase
|
||||
|
||||
private
|
||||
def run_command(*command, fixture: :with_accessories)
|
||||
stdouted { Kamal::Cli::Build.start([ *command, "-c", "test/fixtures/deploy_#{fixture}.yml" ]) }
|
||||
stdouted { stderred { Kamal::Cli::Build.start([ *command, "-c", "test/fixtures/deploy_#{fixture}.yml" ]) } }
|
||||
end
|
||||
|
||||
def stub_dependency_checks
|
||||
|
||||
@@ -11,12 +11,12 @@ class IntegrationTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
teardown do
|
||||
unless passed?
|
||||
# [ :deployer, :vm1, :vm2, :shared, :load_balancer, :registry ].each do |container|
|
||||
# puts
|
||||
# puts "Logs for #{container}:"
|
||||
# docker_compose :logs, container
|
||||
# end
|
||||
if !passed? && ENV["DEBUG"]
|
||||
[ :deployer, :vm1, :vm2, :shared, :load_balancer, :registry ].each do |container|
|
||||
puts
|
||||
puts "Logs for #{container}:"
|
||||
docker_compose :logs, container
|
||||
end
|
||||
end
|
||||
docker_compose "down -t 1"
|
||||
end
|
||||
@@ -25,8 +25,8 @@ class IntegrationTest < ActiveSupport::TestCase
|
||||
def docker_compose(*commands, capture: false, raise_on_error: true)
|
||||
command = "TEST_ID=#{ENV["TEST_ID"]} docker compose #{commands.join(" ")}"
|
||||
succeeded = false
|
||||
if capture
|
||||
result = stdouted { succeeded = system("cd test/integration && #{command}") }
|
||||
if capture || !ENV["DEBUG"]
|
||||
result = stdouted { stderred { succeeded = system("cd test/integration && #{command}") } }
|
||||
else
|
||||
succeeded = system("cd test/integration && #{command}")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user