Skip to content

Commit 9e5b563

Browse files
author
Christopher Frost
committed
Add a test for escaped chars in java_opts vars
This commit adds a test to prove that escaped chars are handled correctly in the environment variable values of `java_opts`.
1 parent f3ea798 commit 9e5b563

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/java_buildpack/framework/java_opts_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@
8686
end
8787
end
8888

89+
context do
90+
let(:configuration) do
91+
{ 'java_opts' => '-javaagent:agent.jar=port="\$PORT",host=localhost' }
92+
end
93+
94+
it 'allows escaped characters' do
95+
component.release
96+
97+
expect(java_opts).to include('-javaagent:agent.jar=port=$PORT,host=localhost')
98+
end
99+
end
100+
89101
context do
90102
let(:configuration) { { 'java_opts' => '-Xms1024M' } }
91103

0 commit comments

Comments
 (0)