def test_create_filesystem(self):
        # Give it a state that says the volume is attached but nothing is
        # mounted.
        device = FilePath(b"/dev/sda")
        node_state = self.ONE_DATASET_STATE.set(
            manifestations={},
            paths={},
            devices={self.DATASET_ID: device},
        )

        # Give it a configuration that says there should be a manifestation.
        node_config = to_node(self.ONE_DATASET_STATE)

        assert_calculated_changes(
            self, node_state, node_config,
            {Dataset(dataset_id=unicode(self.DATASET_ID),
                     maximum_size=LOOPBACK_MINIMUM_ALLOCATABLE_SIZE)},
            in_parallel(changes=[
                CreateFilesystem(device=device, filesystem=u"ext4")
            ]),
            discovered_datasets=[
                DiscoveredDataset(
                    state=DatasetStates.ATTACHED_NO_FILESYSTEM,
                    dataset_id=self.DATASET_ID,
                    blockdevice_id=_create_blockdevice_id_for_test(
                        self.DATASET_ID),
                    maximum_size=LOOPBACK_MINIMUM_ALLOCATABLE_SIZE,
                    device_path=device,
                ),
            ],
        )
If the volume for a dataset is attached to the node but the filesystem
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/test/test_blockdevice.py/BlockDeviceDeployerCreateFilesystemCalculateChangesTests.test_create_filesystem