@@ -526,31 +526,31 @@ def test_command_good(self, mock_requests):
526526 )
527527
528528 # use `start web` for backwards compatibility with slugrunner
529- self .assertEqual (app ._get_command ('web' ), 'start web' )
530- self .assertEqual (app ._get_command ('worker' ), 'start worker' )
529+ self .assertEqual (app ._get_command ('web' ), [ 'start' , ' web'] )
530+ self .assertEqual (app ._get_command ('worker' ), [ 'start' , ' worker'] )
531531
532532 # switch to docker image app
533533 build .sha = ''
534534 build .save ()
535- self .assertEqual (app ._get_command ('web' ), "bash -c ' node server.js'" )
535+ self .assertEqual (app ._get_command ('web' ), [ " node server.js" ] )
536536
537537 # switch to dockerfile app
538538 build .sha = 'european-swallow'
539539 build .dockerfile = 'dockerdockerdocker'
540540 build .save ()
541- self .assertEqual (app ._get_command ('web' ), "bash -c ' node server.js'" )
542- self .assertEqual (app ._get_command ('cmd' ), '' )
541+ self .assertEqual (app ._get_command ('web' ), [ " node server.js" ] )
542+ self .assertEqual (app ._get_command ('cmd' ), [] )
543543
544544 # ensure we can override the cmd process type in a Procfile
545545 build .procfile ['cmd' ] = 'node server.js'
546546 build .save ()
547- self .assertEqual (app ._get_command ('cmd' ), "bash -c ' node server.js'" )
548- self .assertEqual (app ._get_command ('worker' ), "bash -c ' node worker.js'" )
547+ self .assertEqual (app ._get_command ('cmd' ), [ " node server.js" ] )
548+ self .assertEqual (app ._get_command ('worker' ), [ " node worker.js" ] )
549549
550550 # for backwards compatibility if no Procfile is supplied
551551 build .procfile = {}
552552 build .save ()
553- self .assertEqual (app ._get_command ('worker' ), 'start worker' )
553+ self .assertEqual (app ._get_command ('worker' ), [ 'start' , ' worker'] )
554554
555555 def test_run_command_good (self , mock_requests ):
556556 """Test the run command for each container workflow"""
@@ -587,9 +587,8 @@ def test_run_command_good(self, mock_requests):
587587 body = {'command' : 'echo hi' }
588588 response = self .client .post (url , body )
589589 self .assertEqual (response .status_code , 200 , response .data )
590- data = App .objects .get (id = app_id )
591- entrypoint , _ = data ._get_command_run ('echo hi' )
592- self .assertEqual (entrypoint , '/bin/bash' )
590+ app = App .objects .get (id = app_id )
591+ self .assertEqual (app ._get_entrypoint ('web' ), ['/bin/bash' , '-c' ])
593592
594593 # docker image workflow
595594 build .dockerfile = ''
@@ -599,9 +598,8 @@ def test_run_command_good(self, mock_requests):
599598 body = {'command' : 'echo hi' }
600599 response = self .client .post (url , body )
601600 self .assertEqual (response .status_code , 200 , response .data )
602- data = App .objects .get (id = app_id )
603- entrypoint , _ = data ._get_command_run ('echo hi' )
604- self .assertEqual (entrypoint , '/bin/bash' )
601+ app = App .objects .get (id = app_id )
602+ self .assertEqual (app ._get_entrypoint ('cmd' ), [])
605603
606604 # procfile workflow
607605 build .sha = 'somereallylongsha'
@@ -610,9 +608,8 @@ def test_run_command_good(self, mock_requests):
610608 body = {'command' : 'echo hi' }
611609 response = self .client .post (url , body )
612610 self .assertEqual (response .status_code , 200 , response .data )
613- data = App .objects .get (id = app_id )
614- entrypoint , _ = data ._get_command_run ('echo hi' )
615- self .assertEqual (entrypoint , '/runner/init' )
611+ app = App .objects .get (id = app_id )
612+ self .assertEqual (app ._get_entrypoint ('web' ), ['/runner/init' ])
616613
617614 def test_run_not_fail_on_debug (self , mock_requests ):
618615 """
@@ -654,9 +651,8 @@ def test_run_not_fail_on_debug(self, mock_requests):
654651 body = {'command' : 'echo hi' }
655652 response = self .client .post (url , body )
656653 self .assertEqual (response .status_code , 200 , response .data )
657- data = App .objects .get (id = app_id )
658- entrypoint , _ = data ._get_command_run ('echo hi' )
659- self .assertEqual (entrypoint , '/bin/bash' )
654+ app = App .objects .get (id = app_id )
655+ self .assertEqual (app ._get_entrypoint ('web' ), ['/bin/bash' , '-c' ])
660656
661657 def test_scaling_does_not_add_run_proctypes_to_structure (self , mock_requests ):
662658 """Test that app info doesn't show transient "run" proctypes."""
0 commit comments