@@ -210,6 +210,25 @@ def test_release_rollback(self):
210210 self .assertNotEqual (release1 ['uuid' ], release5 ['uuid' ])
211211 self .assertEqual (release1 ['build' ], release5 ['build' ])
212212 self .assertEqual (release1 ['config' ], release5 ['config' ])
213+ # check to see that the current config is actually the initial one
214+ url = "/api/apps/{app_id}/config" .format (** locals ())
215+ response = self .client .get (url )
216+ self .assertEqual (response .status_code , 200 )
217+ self .assertEqual (response .data ['values' ], json .dumps ({}))
218+ # rollback to #3 and see that it has the correct config
219+ url = "/api/apps/{app_id}/releases/rollback/" .format (** locals ())
220+ body = {'version' : 3 }
221+ response = self .client .post (
222+ url , json .dumps (body ), content_type = 'application/json' )
223+ self .assertEqual (response .status_code , 201 )
224+ url = "/api/apps/{app_id}/config" .format (** locals ())
225+ response = self .client .get (url )
226+ self .assertEqual (response .status_code , 200 )
227+ values = json .loads (response .data ['values' ])
228+ self .assertIn ('NEW_URL1' , values )
229+ self .assertEqual ('http://localhost:8080/' , values ['NEW_URL1' ])
230+ self .assertIn ('PATH' , values )
231+ self .assertEqual ('bin:/usr/local/bin:/usr/bin:/bin' , values ['PATH' ])
213232
214233 def test_release_str (self ):
215234 """Test the text representation of a release."""
0 commit comments