Ejemplo n.º 1
0
    def test_config_ssh_user(self):
        c = config.Config(self.real_config)

        expected = 'carbonate'
        self.assertEqual(c.ssh_user('standalone'), expected)
Ejemplo n.º 2
0
    def test_config_ssh_user_default(self):
        c = config.Config(self.simple_config)

        expected = pwd.getpwuid(os.getuid()).pw_name
        self.assertEqual(c.ssh_user(), expected)
Ejemplo n.º 3
0
    def test_config_multiple_clusters(self):
        c = config.Config(self.real_config)

        expected = ['main', 'standalone']
        self.assertEqual(set(c.clusters()), set(expected))
Ejemplo n.º 4
0
    def test_config_destinations(self):
        c = config.Config(self.simple_config)

        expected = ['1.1.1.1:2003:0', '2.2.2.2:2003:0']
        self.assertEqual(c.destinations(), expected)
Ejemplo n.º 5
0
    def test_config_replication_factor(self):
        c = config.Config(self.simple_config)

        self.assertEqual(c.replication_factor(), 1)
Ejemplo n.º 6
0
    def test_config_hashing_type_default(self):
        c = config.Config(self.simple_config)

        expected = 'carbon_ch'
        self.assertEqual(c.hashing_type(), expected)
Ejemplo n.º 7
0
    def test_config_hashing_type(self):
        c = config.Config(self.real_config)

        expected = 'fnv1a_ch'
        self.assertEqual(c.hashing_type('fnv'), expected)