Skip to content

Commit a309fe0

Browse files
author
Glyn Normington
committed
Merge 53870297- to master
[Completes #53870297]
2 parents 09261a8 + 56eff6b commit a309fe0

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

lib/java_buildpack/buildpack.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def self.drive_buildpack_with_logger(app_dir, message)
4444
yield new(app_dir)
4545
rescue => e
4646
logger.error(message % e.inspect)
47-
logger.debug("Exception #{e.inspect} backtrace: #{e.backtrace}")
47+
logger.debug("Exception #{e.inspect} backtrace:\n#{e.backtrace.join("\n")}")
4848
abort e.message
4949
end
5050
end

spec/java_buildpack/buildpack_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ module JavaBuildpack
6363
expect(detected).to be_empty
6464
end
6565

66+
it 'should raise an error on compile if no container can run an application' do
67+
with_buildpack { |buildpack| expect { buildpack.compile }.to raise_error(/No supported application type/) }
68+
end
69+
70+
it 'should raise an error on release if no container can run an application' do
71+
with_buildpack { |buildpack| expect { buildpack.release }.to raise_error(/No supported application type/) }
72+
end
73+
6674
it 'should raise an error if more than one JRE can run an application' do
6775
stub_jre1.stub(:detect).and_return('stub-jre-1')
6876
stub_jre2.stub(:detect).and_return('stub-jre-2')

0 commit comments

Comments
 (0)