@@ -143,23 +143,19 @@ def test_build_hook(self):
143143 # post the build with the builder auth key
144144 response = self .client .post (url , json .dumps (body ), content_type = 'application/json' ,
145145 HTTP_X_DEIS_BUILDER_AUTH = settings .BUILDER_KEY )
146- self .assertEqual (response .status_code , 201 )
147- build = response .data
148- self .assertIn ('sha' , response .data )
149- self .assertIn ('procfile' , response .data )
150- procfile = json .loads (response .data ['procfile' ])
151- self .assertIn ('web' , procfile )
152- self .assertEqual (procfile ['web' ], 'node server.js' )
153- # calculate the databag
154- self .assertTrue (
155- self .client .login (username = 'autotest' , password = 'password' ))
156- url = '/api/apps/{app_id}/calculate' .format (** locals ())
157- response = self .client .post (url )
158146 self .assertEqual (response .status_code , 200 )
159147 databag = response .data
160- self .assertIn ('release' , databag )
161- self .assertIn ('version' , databag ['release' ])
148+ # assert release structure
149+ release = databag ['release' ]
150+ self .assertIn ('config' , release )
151+ self .assertIn ('build' , release )
152+ self .assertIn ('version' , release )
153+ self .assertIn ('domains' , databag )
162154 self .assertIn ('containers' , databag )
163155 self .assertIn ('web' , databag ['containers' ])
164156 self .assertIn ('1' , databag ['containers' ]['web' ])
165157 self .assertEqual (databag ['containers' ]['web' ]['1' ], 'up' )
158+ # assert procfile structure
159+ self .assertIn ('procfile' , release ['build' ])
160+ self .assertIn ('web' , release ['build' ]['procfile' ])
161+ self .assertEqual (release ['build' ]['procfile' ]['web' ], 'node server.js' )
0 commit comments