@@ -707,6 +707,41 @@ def test_build_validate_procfile(self, mock_requests):
707707 }
708708 response = self .client .post (url , body )
709709 self .assertEqual (response .status_code , 400 , response .data )
710+
711+ url = "/v2/apps/{app_id}/builds" .format (** locals ())
712+ body = {
713+ 'image' : 'autotest/example' ,
714+ 'sha' : 'a' * 40 ,
715+ 'procfile' : {
716+ 'web' : 'node server.js' ,
717+ '-' : 'node worker.js'
718+ }
719+ }
720+ response = self .client .post (url , body )
721+ self .assertEqual (response .status_code , 400 , response .data )
722+
723+ url = "/v2/apps/{app_id}/builds" .format (** locals ())
724+ body = {
725+ 'image' : 'autotest/example' ,
726+ 'sha' : 'a' * 40 ,
727+ 'procfile' : {
728+ 'web' : 'node server.js' ,
729+ 'worker-' : 'node worker.js'
730+ }
731+ }
732+ response = self .client .post (url , body )
733+ self .assertEqual (response .status_code , 400 , response .data )
734+ url = "/v2/apps/{app_id}/builds" .format (** locals ())
735+ body = {
736+ 'image' : 'autotest/example' ,
737+ 'sha' : 'a' * 40 ,
738+ 'procfile' : {
739+ 'web' : 'node server.js' ,
740+ '-worker' : 'node worker.js'
741+ }
742+ }
743+ response = self .client .post (url , body )
744+ self .assertEqual (response .status_code , 400 , response .data )
710745 # deploy app with empty command
711746 url = "/v2/apps/{app_id}/builds" .format (** locals ())
712747 body = {
@@ -719,3 +754,15 @@ def test_build_validate_procfile(self, mock_requests):
719754 }
720755 response = self .client .post (url , body )
721756 self .assertEqual (response .status_code , 400 , response .data )
757+
758+ url = "/v2/apps/{app_id}/builds" .format (** locals ())
759+ body = {
760+ 'image' : 'autotest/example' ,
761+ 'sha' : 'a' * 40 ,
762+ 'procfile' : {
763+ 'web' : 'node server.js' ,
764+ 'Worker-test1' : 'node worker.js'
765+ }
766+ }
767+ response = self .client .post (url , body )
768+ self .assertEqual (response .status_code , 201 , response .data )
0 commit comments