def test_add_ptable(self): """@test: Add ptable to os @feature: Operating System - Add ptable @assert: Operating System is updated with ptable """ ptable_obj = make_partition_table() result = PartitionTable.info({'id': ptable_obj['id']}) self.assertEqual(result.return_code, 0) self.assertEqual(len(result.stderr), 0) self.assertEqual(ptable_obj['name'], result.stdout['name']) new_obj = make_os() result = OperatingSys.add_ptable({'id': new_obj['id'], 'ptable': ptable_obj['name']}) self.assertEqual(result.return_code, 0, "Failed to add ptable") self.assertEqual( len(result.stderr), 0, "Should not have gotten an error") result = OperatingSys.info({'id': new_obj['id']}) self.assertEqual(result.return_code, 0, "Failed to find object") self.assertEqual(len(result.stdout['partition-tables']), 1) self.assertIn(ptable_obj['name'], result.stdout['partition-tables'][0])
def test_add_ptable(self): """@test: Add ptable to os @feature: Operating System - Add ptable @assert: Operating System is updated with ptable """ # Create a partition table. ptable_name = make_partition_table()['name'] response = PartitionTable.info({'name': ptable_name}) self.assertEqual(response.return_code, 0, response.stderr) self.assertEqual(len(response.stderr), 0, response.stderr) # Create an operating system. os_id = make_os()['id'] response = OperatingSys.info({'id': os_id}) self.assertEqual(response.return_code, 0, response.stderr) self.assertEqual(len(response.stderr), 0, response.stderr) # Add the partition table to the operating system. response = OperatingSys.add_ptable({ 'id': os_id, 'partition-table': ptable_name, }) self.assertEqual(response.return_code, 0, response.stderr) self.assertEqual(len(response.stderr), 0, response.stderr) # Verify that the operating system has a partition table. response = OperatingSys.info({'id': os_id}) self.assertEqual(len(response.stdout['partition-tables']), 1, response.stdout['partition-tables']) self.assertEqual(response.stdout['partition-tables'][0], ptable_name)
def test_add_ptable(self): """@test: Add ptable to os @feature: Operating System - Add ptable @assert: Operating System is updated with ptable """ # Create a partition table. ptable_name = make_partition_table()['name'] # Create an operating system. os_id = make_os()['id'] # Add the partition table to the operating system. response = OperatingSys.add_ptable({ 'id': os_id, 'partition-table': ptable_name, }) self.assertEqual(response.return_code, 0) self.assertEqual(len(response.stderr), 0) # Verify that the operating system has a partition table. response = OperatingSys.info({'id': os_id}) self.assertEqual(len(response.stdout['partition-tables']), 1) self.assertEqual(response.stdout['partition-tables'][0], ptable_name)
def test_positive_add_ptable(self): """Add partition table to operating system :id: beba676f-b4e4-48e1-bb0c-18ad91847566 :expectedresults: Partition table is added to Operating System :CaseLevel: Integration """ # Create a partition table. ptable_name = make_partition_table()['name'] # Create an operating system. os_id = make_os()['id'] # Add the partition table to the operating system. OperatingSys.add_ptable({'id': os_id, 'partition-table': ptable_name}) # Verify that the operating system has a partition table. os = OperatingSys.info({'id': os_id}) assert len(os['partition-tables']) == 1 assert os['partition-tables'][0] == ptable_name
def test_positive_add_ptable(self): """@test: Add partition table to operating system @feature: Operating System @assert: Partition table is added to Operating System """ # Create a partition table. ptable_name = make_partition_table()['name'] # Create an operating system. os_id = make_os()['id'] # Add the partition table to the operating system. OperatingSys.add_ptable({ 'id': os_id, 'partition-table': ptable_name, }) # Verify that the operating system has a partition table. os = OperatingSys.info({'id': os_id}) self.assertEqual(len(os['partition-tables']), 1) self.assertEqual(os['partition-tables'][0], ptable_name)
def test_positive_add_ptable(self): """Add partition table to operating system @feature: Operating System @assert: Partition table is added to Operating System """ # Create a partition table. ptable_name = make_partition_table()['name'] # Create an operating system. os_id = make_os()['id'] # Add the partition table to the operating system. OperatingSys.add_ptable({ 'id': os_id, 'partition-table': ptable_name, }) # Verify that the operating system has a partition table. os = OperatingSys.info({'id': os_id}) self.assertEqual(len(os['partition-tables']), 1) self.assertEqual(os['partition-tables'][0], ptable_name)
def test_positive_add_ptable(self): """Add partition table to operating system @id: beba676f-b4e4-48e1-bb0c-18ad91847566 @assert: Partition table is added to Operating System @CaseLevel: Integration """ # Create a partition table. ptable_name = make_partition_table()['name'] # Create an operating system. os_id = make_os()['id'] # Add the partition table to the operating system. OperatingSys.add_ptable({ 'id': os_id, 'partition-table': ptable_name, }) # Verify that the operating system has a partition table. os = OperatingSys.info({'id': os_id}) self.assertEqual(len(os['partition-tables']), 1) self.assertEqual(os['partition-tables'][0], ptable_name)