def gpt_empty(self): pt = gpt() self.logger.info("Testing the creation of an empty guid partition table") testfile = "/tmp/gpt_empty.img" pt = gpt() pt.makeDisk(testfile) self.logger.info("Review the result with another paritioning tool to confirm the result")
def gpt_badpart(self): pt = gpt() self.logger.info("Testing the creation of a guid partition table with 1 partition") testfile = "/tmp/gpt_1part.img" pt = gpt() self.assertRaises(InvalidPartitionNumber, pt.addPartition, 129, 512, "linux/filesystem", "a test name") pt.makeDisk(testfile) self.logger.info("Review the result with another paritioning tool to confirm the result")
def gpt_nparts(self): pt = gpt() self.logger.info("Testing the creation of a guid partition table with some partitions") testfile = "/tmp/gpt_nparts.img" pt = gpt() for x in range(choice(range(1, 129))): pt.addPartition(x, 16, "linux/filesystem", "a test name") pt.makeDisk(testfile) self.logger.info("Review the result with another paritioning tool to confirm the result")