@@ -35,6 +35,12 @@ func (s *ProcfileSuite) TestProcV1Parsing(c *C) {
35
35
c .Assert (app .ProcVersion , Equals , 1 )
36
36
c .Assert (app .Services , HasLen , 3 )
37
37
38
+ errs := app .Validate ()
39
+
40
+ if len (errs ) != 0 {
41
+ c .Fatalf ("Validation errors: %v" , errs )
42
+ }
43
+
38
44
c .Assert (app .Services [0 ].Name , Equals , "my_tail_cmd" )
39
45
c .Assert (app .Services [0 ].Cmd , Equals , "/usr/bin/tail -F /var/log/messages" )
40
46
c .Assert (app .Services [0 ].Options , NotNil )
@@ -71,6 +77,12 @@ func (s *ProcfileSuite) TestProcV2Parsing(c *C) {
71
77
c .Assert (app .StartLevel , Equals , 2 )
72
78
c .Assert (app .StopLevel , Equals , 5 )
73
79
80
+ errs := app .Validate ()
81
+
82
+ if len (errs ) != 0 {
83
+ c .Fatalf ("Validation errors: %v" , errs )
84
+ }
85
+
74
86
for _ , service := range app .Services {
75
87
switch service .Name {
76
88
case "my_tail_cmd" :
@@ -85,7 +97,9 @@ func (s *ProcfileSuite) TestProcV2Parsing(c *C) {
85
97
c .Assert (service .Options .Env , NotNil )
86
98
c .Assert (service .Options .Env ["RAILS_ENV" ], Equals , "staging" )
87
99
c .Assert (service .Options .Env ["TEST" ], Equals , "true" )
88
- c .Assert (service .Options .EnvString (), Equals , "\" RAILS_ENV=staging\" \" TEST=true\" " )
100
+ c .Assert (service .Options .Env ["JAVA_OPTS" ], Equals , "\" -Xms512m -Xmx1g -XX:+HeapDumpOnIutOfMemoryError\" " )
101
+ c .Assert (service .Options .Env ["QUEUE" ], Equals , "log_syncronizer,file_downloader,log_searcher" )
102
+ c .Assert (service .Options .EnvString (), Equals , "HEX_HOME=/srv/projects/ploy/shared/tmp JAVA_OPTS=\" -Xms512m -Xmx1g -XX:+HeapDumpOnIutOfMemoryError\" QUEUE=log_syncronizer,file_downloader,log_searcher RAILS_ENV=staging TEST=true" )
89
103
c .Assert (service .Options .LimitFile , Equals , 4096 )
90
104
c .Assert (service .Options .LimitProc , Equals , 4096 )
91
105
c .Assert (service .Application , NotNil )
@@ -124,7 +138,7 @@ func (s *ProcfileSuite) TestProcV2Parsing(c *C) {
124
138
c .Assert (service .Options .Env , NotNil )
125
139
c .Assert (service .Options .Env ["RAILS_ENV" ], Equals , "production" )
126
140
c .Assert (service .Options .Env ["TEST" ], Equals , "true" )
127
- c .Assert (service .Options .EnvString (), Equals , "\" RAILS_ENV=production\" \" TEST=true\" " )
141
+ c .Assert (service .Options .EnvString (), Equals , "RAILS_ENV=production TEST=true" )
128
142
c .Assert (service .Options .LimitFile , Equals , 4096 )
129
143
c .Assert (service .Options .LimitProc , Equals , 4096 )
130
144
c .Assert (service .Application , NotNil )
@@ -142,7 +156,7 @@ func (s *ProcfileSuite) TestProcV2Parsing(c *C) {
142
156
c .Assert (service .Options .Env , NotNil )
143
157
c .Assert (service .Options .Env ["RAILS_ENV" ], Equals , "production" )
144
158
c .Assert (service .Options .Env ["TEST" ], Equals , "true" )
145
- c .Assert (service .Options .EnvString (), Equals , "\" RAILS_ENV=production\" \" TEST=true\" " )
159
+ c .Assert (service .Options .EnvString (), Equals , "RAILS_ENV=production TEST=true" )
146
160
c .Assert (service .Options .LimitFile , Equals , 1024 )
147
161
c .Assert (service .Options .LimitProc , Equals , 4096 )
148
162
c .Assert (service .Application , NotNil )
0 commit comments