Specify tags to cloneDrive() and assert they are retrieved

This commit is contained in:
Alasdair Hodge 2011-12-22 01:11:17 +00:00
parent 91c0492e6a
commit 601922a8e4
1 changed files with 9 additions and 2 deletions

View File

@ -446,9 +446,16 @@ public class CloudSigmaClientLiveTest {
protected void prepareDrive() { protected void prepareDrive() {
client.destroyDrive(drive.getUuid()); client.destroyDrive(drive.getUuid());
drive = client.cloneDrive(bootDrive, drive.getName(), drive = client.cloneDrive(bootDrive, drive.getName(),
new CloneDriveOptions().size(driveSize)); new CloneDriveOptions()
.size(driveSize)
.tags("cat:mouse", "monkey:banana")
);
// Block until the async clone operation has completed.
assert driveNotClaimed.apply(drive) : client.getDriveInfo(drive.getUuid()); assert driveNotClaimed.apply(drive) : client.getDriveInfo(drive.getUuid());
System.err.println("after prepare" + client.getDriveInfo(drive.getUuid()));
DriveInfo clonedDrive = client.getDriveInfo(drive.getUuid());
System.err.println("after prepare" + clonedDrive);
assertEquals(clonedDrive.getTags(), ImmutableSet.of("cat:mouse", "monkey:banana"));
} }
} }