@@ -185,9 +185,11 @@ public void testListSnapshots() {
185
185
result = new Delegate () {
186
186
public Status list (String remotePath , List <RemoteFile > result ) {
187
187
result .add (new RemoteFile (location + "//" + Repository .PREFIX_REPO + name + "/"
188
- + Repository .PREFIX_SNAPSHOT_DIR + "/" + "a" , false , 100 , 0 ));
189
- result .add (new RemoteFile (location + "/" + Repository .PREFIX_REPO + name + "/"
190
- + Repository .PREFIX_SNAPSHOT_DIR + "/" + "_ss_b" , true , 100 , 0 ));
188
+ + Repository .PREFIX_SNAPSHOT_DIR + "a/__info_" , false , 100 , 0 ));
189
+ result .add (new RemoteFile (location + "//" + Repository .PREFIX_REPO + name + "/"
190
+ + Repository .PREFIX_SNAPSHOT_DIR + "/" + "a/__info_" , false , 100 , 0 ));
191
+ result .add (new RemoteFile (location + "/" + Repository .PREFIX_REPO + name
192
+ + "/_ss_b/__info_" , true , 100 , 0 ));
191
193
return Status .OK ;
192
194
}
193
195
};
@@ -197,6 +199,7 @@ public Status list(String remotePath, List<RemoteFile> result) {
197
199
repo = new Repository (10000 , name , false , location , fileSystem );
198
200
List <String > snapshotNames = Lists .newArrayList ();
199
201
Status st = repo .listSnapshots (snapshotNames );
202
+ System .out .println (snapshotNames );
200
203
Assert .assertTrue (st .ok ());
201
204
Assert .assertEquals (1 , snapshotNames .size ());
202
205
Assert .assertEquals ("a" , snapshotNames .get (0 ));
@@ -291,16 +294,20 @@ public void testGetSnapshotInfo() {
291
294
minTimes = 0 ;
292
295
result = new Delegate () {
293
296
public Status list (String remotePath , List <RemoteFile > result ) {
297
+ String metaFilePath1 = location + "//" + Repository .PREFIX_REPO + name + "//"
298
+ + Repository .PREFIX_SNAPSHOT_DIR + "s1//"
299
+ + "__info_2018-04-18-20-11-00.12345678123456781234567812345678" ;
300
+ String metaFilePath2 = location + "//" + Repository .PREFIX_REPO + name + "//"
301
+ + Repository .PREFIX_SNAPSHOT_DIR + "s2//"
302
+ + "__info_2018-04-18-20-11-00.12345678123456781234567812345678" ;
294
303
if (remotePath .contains (Repository .PREFIX_JOB_INFO )) {
295
- result .add (new RemoteFile (" __info_2018-04-18-20-11-00.12345678123456781234567812345678" ,
304
+ result .add (new RemoteFile (metaFilePath1 ,
296
305
true ,
297
306
100 ,
298
307
0 ));
299
308
} else {
300
- result .add (new RemoteFile (location + "//" + Repository .PREFIX_REPO + name + "//"
301
- + Repository .PREFIX_SNAPSHOT_DIR + "s1" , false , 100 , 0 ));
302
- result .add (new RemoteFile (location + "/" + Repository .PREFIX_REPO + name + "/"
303
- + Repository .PREFIX_SNAPSHOT_DIR + "s2" , false , 100 , 0 ));
309
+ result .add (new RemoteFile (metaFilePath1 , true , 100 , 0 ));
310
+ result .add (new RemoteFile (metaFilePath2 , true , 100 , 0 ));
304
311
}
305
312
return Status .OK ;
306
313
}
0 commit comments