@@ -141,19 +141,27 @@ var _ = Describe("restage command", func() {
141141 Eventually (session ).Should (Exit (1 ))
142142 })
143143
144- When ("strategy rolling is given " , func () {
144+ When ("a deployment strategy is used " , func () {
145145 It ("fails and displays the deployment failure message" , func () {
146146 userName , _ := helpers .GetCredentials ()
147147 session := helpers .CustomCF (helpers.CFEnv {
148148 EnvVars : map [string ]string {"CF_STARTUP_TIMEOUT" : "0.1" },
149- }, "restage" , appName , "--strategy" , "rolling " , "--max-in-flight" , "3" )
149+ }, "restage" , appName , "--strategy" , "canary " , "--max-in-flight" , "3" )
150150 Consistently (session .Err ).ShouldNot (Say (`This action will cause app downtime\.` ))
151151 Eventually (session ).Should (Say (`Restaging app %s in org %s / space %s as %s\.\.\.` , appName , orgName , spaceName , userName ))
152152 Eventually (session ).Should (Say (`Creating deployment for app %s\.\.\.` , appName ))
153153 Eventually (session ).Should (Say (`Waiting for app to deploy\.\.\.` ))
154- Eventually (session .Err ).Should (Say (`Cannot cancel a deployment with status: FINALIZED and reason: DEPLOYED` ))
154+ Eventually (session .Err ).Should (Say (`Start app timeout` ))
155+ Eventually (session .Err ).Should (Say (`TIP: Application must be listening on the right port\.` ))
155156 Eventually (session ).Should (Say ("FAILED" ))
156157 Eventually (session ).Should (Exit (1 ))
158+
159+ appGUID := helpers .AppGUID (appName )
160+ Eventually (func () * Buffer {
161+ session_deployment := helpers .CF ("curl" , fmt .Sprintf ("/v3/deployments?app_guids=%s" , appGUID ))
162+ Eventually (session_deployment ).Should (Exit (0 ))
163+ return session_deployment .Out
164+ }).Should (Say (`"reason":\s*"CANCELED"` ))
157165 })
158166 })
159167 })
0 commit comments