~raharper/curtin/trunk.lvmroot

« back to all changes in this revision

Viewing changes to tests/unittests/test_block_mkfs.py

  • Committer: Ryan Harper
  • Date: 2017-11-28 21:08:46 UTC
  • Revision ID: ryan.harper@canonical.com-20171128210846-k15q3rxtm7ktpzkn
Refactor mkfs parameter generation

Allow some mkfs parameters to accept a param formatter.  Some options like
'force' and 'quiet' are flag-only options which do not accept a param.
Those values don't need a tuple for their value, but just the flag string.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        self._run_mkfs_with_config(conf, "mkfs.btrfs", expected_flags)
68
68
 
69
69
    def test_mkfs_xfs(self):
 
70
        """ mkfs.xfs passes uuid parameter """
70
71
        conf = self._get_config("xfs")
71
72
        expected_flags = ['-f', ['-L', 'format1'],
72
 
                          ['-m', 'uuid=%s' % self.test_uuid]]
 
73
                          '-m uuid=%s' % self.test_uuid]
73
74
        self._run_mkfs_with_config(conf, "mkfs.xfs", expected_flags)
74
75
 
75
76
    def test_mkfs_btrfs_on_precise(self):