Exemplo n.º 1
0
 @Override
 @BeforeClass(groups = "live")
 public void setup() {
   super.setup();
   for (String regionId : regions) {
     getApi().getContainerApi(regionId).create(name);
   }
 }
Exemplo n.º 2
0
  @Override
  @BeforeClass(groups = "live")
  public void setup() {
    super.setup();
    for (String regionId : regions) {
      boolean created = getApi().getContainerApi(regionId).create(containerName);
      if (!created) {
        deleteAllObjectsInContainer(regionId, containerName);
      }
    }
    GenericArchive files = ShrinkWrap.create(GenericArchive.class, "files.tar.gz");
    StringAsset content = new StringAsset("foo");
    for (int i = 0; i < OBJECT_COUNT; i++) {
      paths.add(containerName + "/file" + i);
      files.add(content, "/file" + i);
    }

    try {
      tarGz = ByteStreams2.toByteArrayAndClose(files.as(TarGzExporter.class).exportAsInputStream());
    } catch (IOException e) {
      throw Throwables.propagate(e);
    }
  }