Esempio n. 1
0
    def test_add_host(self):
        """
        Test cases for Add, replace, or update the A
        and PTR (reverse) records for a host.
        """
        with patch("salt.modules.ddns.update") as ddns_update:
            ddns_update.return_value = False
            self.assertFalse(ddns.add_host(zone="A", name="B", ttl=1, ip="172.27.0.0"))

            ddns_update.return_value = True
            self.assertTrue(ddns.add_host(zone="A", name="B", ttl=1, ip="172.27.0.0"))
Esempio n. 2
0
    def test_add_host(self, ddns_update):
        '''
        Test cases for Add, replace, or update the A
        and PTR (reverse) records for a host.
        '''
        ddns_update.return_value = False
        self.assertFalse(
            ddns.add_host(zone='A', name='B', ttl=1, ip='172.27.0.0'))

        ddns_update.return_value = True
        self.assertTrue(
            ddns.add_host(zone='A', name='B', ttl=1, ip='172.27.0.0'))
Esempio n. 3
0
    def test_add_host(self):
        '''
        Test cases for Add, replace, or update the A
        and PTR (reverse) records for a host.
        '''
        with patch('salt.modules.ddns.update') as ddns_update:
            ddns_update.return_value = False
            self.assertFalse(
                ddns.add_host(zone='A', name='B', ttl=1, ip='172.27.0.0'))

            ddns_update.return_value = True
            self.assertTrue(
                ddns.add_host(zone='A', name='B', ttl=1, ip='172.27.0.0'))
Esempio n. 4
0
    def test_add_host(self, ddns_update):
        '''
        Test cases for Add, replace, or update the A
        and PTR (reverse) records for a host.
        '''
        ddns_update.return_value = False
        self.assertFalse(ddns.add_host(zone='A',
                                       name='B',
                                       ttl=1,
                                       ip='172.27.0.0'))

        ddns_update.return_value = True
        self.assertTrue(ddns.add_host(zone='A',
                                      name='B',
                                      ttl=1,
                                      ip='172.27.0.0'))