@@ -139,11 +139,11 @@ describe('PUT /instances/:id/actions/restart', { timeout: 500 }, function () {
139139 beforeEach ( function ( done ) {
140140 extend ( ctx . expected , {
141141 containers : exists ,
142- 'container ' : exists ,
143- 'container .ports' : exists ,
144- 'container .dockerHost' : exists ,
145- 'container .dockerContainer' : exists ,
146- 'container .inspect.State.Running' : true
142+ 'containers[0] ' : exists ,
143+ 'containers[0] .ports' : exists ,
144+ 'containers[0] .dockerHost' : exists ,
145+ 'containers[0] .dockerContainer' : exists ,
146+ 'containers[0] .inspect.State.Running' : true
147147 } ) ;
148148 ctx . expectAlreadyStarted = true ;
149149 done ( ) ;
@@ -155,10 +155,10 @@ describe('PUT /instances/:id/actions/restart', { timeout: 500 }, function () {
155155 beforeEach ( function ( done ) {
156156 extend ( ctx . expected , {
157157 containers : exists ,
158- 'container ' : exists ,
159- 'container .dockerHost' : exists ,
160- 'container .dockerContainer' : exists ,
161- 'container .inspect.State.Running' : false
158+ 'containers[0] ' : exists ,
159+ 'containers[0] .dockerHost' : exists ,
160+ 'containers[0] .dockerContainer' : exists ,
161+ 'containers[0] .inspect.State.Running' : false
162162 } ) ;
163163 ctx . originalStart = Docker . prototype . startContainer ;
164164 Docker . prototype . startContainer = stopContainerRightAfterStart ;
@@ -174,8 +174,8 @@ describe('PUT /instances/:id/actions/restart', { timeout: 500 }, function () {
174174 } ) ;
175175 describe ( 'Container create error (Invalid dockerfile CMD)' , function ( ) {
176176 beforeEach ( function ( done ) {
177- ctx . expected [ 'container .error.message' ] = exists ;
178- ctx . expected [ 'container .error.stack' ] = exists ;
177+ ctx . expected [ 'containers[0] .error.message' ] = exists ;
178+ ctx . expected [ 'containers[0] .error.stack' ] = exists ;
179179 ctx . expectNoContainerErr = true ;
180180 ctx . originalCreateContainer = Dockerode . prototype . createContainer ;
181181 Dockerode . prototype . createContainer = forceCreateContainerErr ;
@@ -226,7 +226,7 @@ describe('PUT /instances/:id/actions/restart', { timeout: 500 }, function () {
226226 it ( 'should restart an instance' , function ( done ) {
227227 if ( ctx . originalStart ) { // restore docker back to normal - immediately exiting container will now start
228228 Docker . prototype . startContainer = ctx . originalStart ;
229- ctx . expected [ 'container .inspect.State.Running' ] = true ;
229+ ctx . expected [ 'containers[0] .inspect.State.Running' ] = true ;
230230 }
231231 if ( ctx . expectNoContainerErr ) {
232232 ctx . instance . restart ( expects . error ( 400 , / n o t h a v e a c o n t a i n e r / , done ) ) ;
0 commit comments