@@ -125,8 +125,8 @@ def _makeOne(self, options):
125
125
126
126
def test_main_first (self ):
127
127
options = DummyOptions ()
128
- pconfig = DummyPConfig (options , 'foo' , 'foo' , '/bin/foo ' )
129
- gconfigs = [DummyPGroupConfig (options ,'foo' , pconfigs = [pconfig ])]
128
+ pconfig = DummyPConfig (options , 'foo' , '/bin/ foo' , '/tmp ' )
129
+ gconfigs = [DummyPGroupConfig (options , 'foo' , pconfigs = [pconfig ])]
130
130
options .process_group_configs = gconfigs
131
131
options .test = True
132
132
options .first = True
@@ -151,8 +151,8 @@ def test_main_first(self):
151
151
152
152
def test_main_notfirst (self ):
153
153
options = DummyOptions ()
154
- pconfig = DummyPConfig (options , 'foo' , 'foo' , '/bin/foo ' )
155
- gconfigs = [DummyPGroupConfig (options ,'foo' , pconfigs = [pconfig ])]
154
+ pconfig = DummyPConfig (options , 'foo' , '/bin/ foo' , '/tmp ' )
155
+ gconfigs = [DummyPGroupConfig (options , 'foo' , pconfigs = [pconfig ])]
156
156
options .process_group_configs = gconfigs
157
157
options .test = True
158
158
options .first = False
@@ -178,7 +178,7 @@ def test_main_notfirst(self):
178
178
def test_reap (self ):
179
179
options = DummyOptions ()
180
180
options .waitpid_return = 1 , 1
181
- pconfig = DummyPConfig (options , 'process' , 'process ' , '/bin/process1 ' )
181
+ pconfig = DummyPConfig (options , 'process' , '/bin/foo ' , '/tmp ' )
182
182
process = DummyProcess (pconfig )
183
183
process .drained = False
184
184
process .killing = True
@@ -199,7 +199,7 @@ def test_reap_recursionguard(self):
199
199
def test_reap_more_than_once (self ):
200
200
options = DummyOptions ()
201
201
options .waitpid_return = 1 , 1
202
- pconfig = DummyPConfig (options , 'process' , 'process ' , '/bin/process1 ' )
202
+ pconfig = DummyPConfig (options , 'process' , '/bin/foo ' , '/tmp ' )
203
203
process = DummyProcess (pconfig )
204
204
process .drained = False
205
205
process .killing = True
@@ -214,7 +214,7 @@ def test_reap_more_than_once(self):
214
214
def test_reap_unknown_pid (self ):
215
215
options = DummyOptions ()
216
216
options .waitpid_return = 2 , 0 # pid, status
217
- pconfig = DummyPConfig (options , 'process' , 'process ' , '/bin/process1 ' )
217
+ pconfig = DummyPConfig (options , 'process' , '/bin/foo ' , '/tmp ' )
218
218
process = DummyProcess (pconfig )
219
219
process .drained = False
220
220
process .killing = True
@@ -300,11 +300,11 @@ def test_handle_sigchld(self):
300
300
def test_handle_sigusr2 (self ):
301
301
options = DummyOptions ()
302
302
options ._signal = signal .SIGUSR2
303
- pconfig1 = DummyPConfig (options , 'process1' , 'process1' , '/bin/process1 ' )
303
+ pconfig1 = DummyPConfig (options , 'process1' , '/bin/foo' , '/tmp ' )
304
304
process1 = DummyProcess (pconfig1 , state = ProcessStates .STOPPING )
305
305
process1 .delay = time .time () - 1
306
306
supervisord = self ._makeOne (options )
307
- pconfigs = [DummyPConfig (options , 'foo' , 'foo' , '/bin/foo ' )]
307
+ pconfigs = [DummyPConfig (options , 'foo' , '/bin/ foo' , '/tmp ' )]
308
308
options .process_group_configs = DummyPGroupConfig (
309
309
options , 'foo' ,
310
310
pconfigs = pconfigs )
@@ -337,7 +337,7 @@ def test_diff_to_active_finds_groups_added(self):
337
337
options = DummyOptions ()
338
338
supervisord = self ._makeOne (options )
339
339
340
- pconfig = DummyPConfig (options , 'process1' , 'process1 ' )
340
+ pconfig = DummyPConfig (options , 'process1' , '/bin/foo' , '/tmp ' )
341
341
group1 = DummyPGroupConfig (options , 'group1' , pconfigs = [pconfig ])
342
342
343
343
# the active configuration has no groups
@@ -352,10 +352,10 @@ def test_diff_to_active_finds_groups_removed(self):
352
352
options = DummyOptions ()
353
353
supervisord = self ._makeOne (options )
354
354
355
- pconfig = DummyPConfig (options , 'process1' , 'process1' )
355
+ pconfig = DummyPConfig (options , 'process1' , '/bin/ process1' , '/tmp ' )
356
356
group1 = DummyPGroupConfig (options , 'group1' , pconfigs = [pconfig ])
357
357
358
- pconfig = DummyPConfig (options , 'process2' , 'process2' )
358
+ pconfig = DummyPConfig (options , 'process2' , '/bin/ process2' , '/tmp ' )
359
359
group2 = DummyPGroupConfig (options , 'group2' , pconfigs = [pconfig ])
360
360
361
361
# set up supervisord with an active configuration of group1 and group2
@@ -562,8 +562,8 @@ def make_gconfig(name, pconfigs, pool_events, result_handler='supervisor.dispatc
562
562
563
563
def test_add_process_group (self ):
564
564
options = DummyOptions ()
565
- pconfig = DummyPConfig (options , 'foo' , 'foo' , '/bin/foo ' )
566
- gconfig = DummyPGroupConfig (options ,'foo' , pconfigs = [pconfig ])
565
+ pconfig = DummyPConfig (options , 'foo' , '/bin/ foo' , '/tmp ' )
566
+ gconfig = DummyPGroupConfig (options , 'foo' , pconfigs = [pconfig ])
567
567
options .process_group_configs = [gconfig ]
568
568
supervisord = self ._makeOne (options )
569
569
@@ -585,8 +585,8 @@ def callback(event):
585
585
L .append (1 )
586
586
events .subscribe (events .ProcessGroupAddedEvent , callback )
587
587
options = DummyOptions ()
588
- pconfig = DummyPConfig (options , 'foo' , 'foo' , '/bin/foo ' )
589
- gconfig = DummyPGroupConfig (options ,'foo' , pconfigs = [pconfig ])
588
+ pconfig = DummyPConfig (options , 'foo' , '/bin/ foo' , '/tmp ' )
589
+ gconfig = DummyPGroupConfig (options , 'foo' , pconfigs = [pconfig ])
590
590
options .process_group_configs = [gconfig ]
591
591
supervisord = self ._makeOne (options )
592
592
@@ -598,7 +598,7 @@ def callback(event):
598
598
599
599
def test_remove_process_group (self ):
600
600
options = DummyOptions ()
601
- pconfig = DummyPConfig (options , 'foo' , 'foo' , '/bin/foo ' )
601
+ pconfig = DummyPConfig (options , 'foo' , '/bin/ foo' , '/tmp ' )
602
602
gconfig = DummyPGroupConfig (options , 'foo' , pconfigs = [pconfig ])
603
603
supervisord = self ._makeOne (options )
604
604
@@ -624,8 +624,8 @@ def callback(event):
624
624
L .append (1 )
625
625
events .subscribe (events .ProcessGroupRemovedEvent , callback )
626
626
options = DummyOptions ()
627
- pconfig = DummyPConfig (options , 'foo' , 'foo' , '/bin/foo ' )
628
- gconfig = DummyPGroupConfig (options ,'foo' , pconfigs = [pconfig ])
627
+ pconfig = DummyPConfig (options , 'foo' , '/bin/ foo' , '/tmp ' )
628
+ gconfig = DummyPGroupConfig (options , 'foo' , pconfigs = [pconfig ])
629
629
options .process_group_configs = [gconfig ]
630
630
supervisord = self ._makeOne (options )
631
631
0 commit comments