@@ -0,0 +1,1241 @@
+import pytest%0A%0Afrom ceph_deploy.cli import get_parser%0A%0A%0Aclass TestParserMDS(object):%0A%0A    def setup(self):%0A        self.parser = get_parser()%0A%0A    def test_mds_help(self, capsys):%0A        with pytest.raises(SystemExit):%0A            self.parser.parse_args('mds --help'.split())%0A        out, err = capsys.readouterr()%0A        assert 'usage: ceph-deploy mds' in out%0A        assert 'positional arguments:' in out%0A        assert 'optional arguments:' in out%0A%0A    @pytest.mark.skipif(reason=%22http://tracker.ceph.com/issues/12150%22)%0A    def test_mds_create_host_required(self, capsys):%0A        with pytest.raises(SystemExit):%0A            self.parser.parse_args('mds create'.split())%0A        out, err = capsys.readouterr()%0A        assert %22error: too few arguments%22 in err%0A%0A    def test_mds_create_one_host(self):%0A        args = self.parser.parse_args('mds create host1'.split())%0A        assert args.mds%5B0%5D%5B0%5D == 'host1'%0A%0A    def test_mds_create_multiple_hosts(self):%0A        hostnames = %5B'host1', 'host2', 'host3'%5D%0A        args = self.parser.parse_args(%5B'mds', 'create'%5D + hostnames)%0A        # args.mds is a list of tuples, and tuple%5B0%5D is the hostname%0A        hosts = %5Bx%5B0%5D for x in args.mds%5D%0A        assert frozenset(hosts) == frozenset(hostnames)%0A

Add argparse tests for mds