Add clearing FS label to CreateAndWriteLabel unit test
For FAT16/32 and XFS file systems clearing the label uses different command options and code path in file system specific ::write_label() method. Therefore extend this unit test to also test clearing the label.
This commit is contained in:
parent
b7ef1688b8
commit
a46c0cbe80
|
@ -596,7 +596,11 @@ TEST_P(SupportedFileSystemsTest, CreateAndWriteLabel)
|
||||||
m_partition.set_filesystem_label("FIRST");
|
m_partition.set_filesystem_label("FIRST");
|
||||||
ASSERT_TRUE(m_fs_object->create(m_partition, m_operation_detail)) << m_operation_detail;
|
ASSERT_TRUE(m_fs_object->create(m_partition, m_operation_detail)) << m_operation_detail;
|
||||||
|
|
||||||
// Test writing a label is successful.
|
// Test clearing the label is successful.
|
||||||
|
m_partition.set_filesystem_label("");
|
||||||
|
ASSERT_TRUE(m_fs_object->write_label(m_partition, m_operation_detail)) << m_operation_detail;
|
||||||
|
|
||||||
|
// Test writing the label is successful.
|
||||||
m_partition.set_filesystem_label("SECOND");
|
m_partition.set_filesystem_label("SECOND");
|
||||||
ASSERT_TRUE(m_fs_object->write_label(m_partition, m_operation_detail)) << m_operation_detail;
|
ASSERT_TRUE(m_fs_object->write_label(m_partition, m_operation_detail)) << m_operation_detail;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue