Quote and escape environment variables in upstart templates

This commit is contained in:
Matt Griffin
2012-04-03 16:36:18 -04:00
parent 69216b4c5e
commit 2fcb64959b
3 changed files with 22 additions and 1 deletions
+6
View File
@@ -33,6 +33,12 @@ describe Foreman::Export::Upstart, :fakefs do
upstart.export
end
it "quotes and escapes environment variables" do
engine.environment['KEY'] = 'd"\|d'
upstart.export
File.read("/tmp/init/app-alpha-1.conf").should include('KEY="d\"\\\\|d"')
end
context "with concurrency" do
let(:options) { Hash[:concurrency => "alpha=2"] }