BucketFormat.SPLUNK_BUCKET_TGZ);
}
public static LocalBucket createRealReplicatedBucket(String index,
File parent, String guid) {
LocalBucket realBucket = TUtilsBucket.createRealBucket();
String replicatedBucketName = replicatedBucketName(realBucket, guid);
File bucketDir = realBucket.getDirectory();
File renamedDir = new File(parent, replicatedBucketName);
int filesInBucket = bucketDir.listFiles().length;
assertTrue(bucketDir.renameTo(renamedDir));
assertEquals(filesInBucket, renamedDir.listFiles().length);
try {
return new LocalBucket(renamedDir, index, realBucket.getFormat());
} catch (Exception e) {
TUtilsTestNG.failForException("Could not create bucket", e);
return null;
}
}