Example #1
0
    def test_positive_update_name(self):
        """Create a Partition Table and update its name

        @Feature: Partition Table

        @Assert: Partition Table is created and its name can be updated
        """
        ptable = make_partition_table()
        for new_name in generate_strings_list(length=randint(4, 30)):
            with self.subTest(new_name):
                PartitionTable.update({
                    'id': ptable['id'],
                    'new-name': new_name,
                })
                ptable = PartitionTable.info({'id': ptable['id']})
                self.assertEqual(ptable['name'], new_name)
Example #2
0
    def test_positive_update_name(self):
        """Create a Partition Table and update its name

        :id: 6242c915-0f15-4d5f-9f7a-73cb58fac81e

        :expectedresults: Partition Table is created and its name can be
            updated

        :CaseImportance: Medium
        """
        ptable = make_partition_table()
        for new_name in generate_strings_list(length=randint(4, 30)):
            with self.subTest(new_name):
                PartitionTable.update({'id': ptable['id'], 'new-name': new_name})
                ptable = PartitionTable.info({'id': ptable['id']})
                self.assertEqual(ptable['name'], new_name)
Example #3
0
    def test_positive_update_name(self):
        """Create a Partition Table and update its name

        :id: 6242c915-0f15-4d5f-9f7a-73cb58fac81e

        :expectedresults: Partition Table is created and its name can be
            updated

        :CaseImportance: Critical
        """
        ptable = make_partition_table()
        for new_name in generate_strings_list(length=randint(4, 30)):
            with self.subTest(new_name):
                PartitionTable.update({
                    'id': ptable['id'],
                    'new-name': new_name,
                })
                ptable = PartitionTable.info({'id': ptable['id']})
                self.assertEqual(ptable['name'], new_name)
Example #4
0
    def test_positive_crud_with_name(self, name, new_name):
        """Create, read, update and delete Partition Tables with different names

        :id: ce512fef-fbf2-4365-b70b-d30221111d96

        :expectedresults: Partition Table is created, updated and deleted with correct name

        :parametrized: yes

        :CaseImportance: Critical
        """
        ptable = make_partition_table({'name': name})
        assert ptable['name'] == name
        PartitionTable.update({'id': ptable['id'], 'new-name': new_name})
        ptable = PartitionTable.info({'id': ptable['id']})
        assert ptable['name'] == new_name
        PartitionTable.delete({'name': ptable['name']})
        with pytest.raises(CLIReturnCodeError):
            PartitionTable.info({'name': ptable['name']})