@@ -52,8 +52,8 @@ describe("#container", function() {
5252 } ) ;
5353 } ) ;
5454
55- describe ( "#checkpoints " , function ( ) {
56- it ( "should create container checkpoint " , function ( done ) {
55+ describe ( "#archive " , function ( ) {
56+ it ( "should get an archive inside the container " , function ( done ) {
5757 var container = docker . getContainer ( testContainer ) ;
5858
5959 function handler ( err , data ) {
@@ -62,10 +62,12 @@ describe("#container", function() {
6262 done ( ) ;
6363 }
6464
65- container . createCheckpoint ( handler ) ;
65+ container . getArchive ( {
66+ 'path' : '/var/log/dmesg'
67+ } , handler ) ;
6668 } ) ;
6769
68- it ( "should list containers checkpoints " , function ( done ) {
70+ it ( "should put an archive inside the container " , function ( done ) {
6971 var container = docker . getContainer ( testContainer ) ;
7072
7173 function handler ( err , data ) {
@@ -74,12 +76,12 @@ describe("#container", function() {
7476 done ( ) ;
7577 }
7678
77- container . listCheckpoint ( handler ) ;
79+ container . putArchive ( './test/test.tar' , {
80+ 'path' : '/root'
81+ } , handler ) ;
7882 } ) ;
79- } ) ;
8083
81- describe ( "#archive" , function ( ) {
82- it ( "should get an archive inside the container" , function ( done ) {
84+ it ( "should inspect an archive inside the container" , function ( done ) {
8385 var container = docker . getContainer ( testContainer ) ;
8486
8587 function handler ( err , data ) {
@@ -88,26 +90,35 @@ describe("#container", function() {
8890 done ( ) ;
8991 }
9092
91- container . getArchive ( {
92- 'path' : '/var/log/dmesg '
93+ container . infoArchive ( {
94+ 'path' : '/root/Dockerfile '
9395 } , handler ) ;
9496 } ) ;
97+ } ) ;
98+
99+ describe ( "#start" , function ( ) {
100+ it ( "should start a container" , function ( done ) {
101+ this . timeout ( 60000 ) ;
95102
96- it ( "should put an archive inside the container" , function ( done ) {
97103 var container = docker . getContainer ( testContainer ) ;
98104
99105 function handler ( err , data ) {
100106 expect ( err ) . to . be . null ;
101- expect ( data ) . to . be . ok ;
102107 done ( ) ;
103108 }
104109
105- container . putArchive ( './test/test.tar' , {
106- 'path' : '/root'
107- } , handler ) ;
110+ container . start ( handler ) ;
108111 } ) ;
112+ } ) ;
109113
110- it ( "should inspect an archive inside the container" , function ( done ) {
114+ describe ( "#checkpoints" , function ( ) {
115+ before ( function ( ) {
116+ if ( process . platform === 'darwin' ) {
117+ this . skip ( ) ;
118+ }
119+ } ) ;
120+
121+ it ( "should create container checkpoint" , function ( done ) {
111122 var container = docker . getContainer ( testContainer ) ;
112123
113124 function handler ( err , data ) {
@@ -116,24 +127,21 @@ describe("#container", function() {
116127 done ( ) ;
117128 }
118129
119- container . infoArchive ( {
120- 'path ' : '/root/Dockerfile '
130+ container . createCheckpoint ( {
131+ 'checkpointID ' : 'testCheckpoint '
121132 } , handler ) ;
122133 } ) ;
123- } ) ;
124-
125- describe ( "#start" , function ( ) {
126- it ( "should start a container" , function ( done ) {
127- this . timeout ( 60000 ) ;
128134
135+ it ( "should list containers checkpoints" , function ( done ) {
129136 var container = docker . getContainer ( testContainer ) ;
130137
131138 function handler ( err , data ) {
132139 expect ( err ) . to . be . null ;
140+ expect ( data ) . to . be . ok ;
133141 done ( ) ;
134142 }
135143
136- container . start ( handler ) ;
144+ container . listCheckpoint ( handler ) ;
137145 } ) ;
138146 } ) ;
139147
0 commit comments