Exemplo n.º 1
0
 def test_get_puppet_vars2(self):
     expected_vars = {
         'realm': 'labs',
         'instancecreator_email': '*****@*****.**',
         'instancecreator_username': '******',
         'instancecreator_lang': 'en',
         'instanceproject': 'bots',
         'instancename': 'bots-cb-dev-test'
     }
     vars = build.get_puppet_vars(self.instance2)
     self.assertEqual(sorted(expected_vars), sorted(vars))
Exemplo n.º 2
0
 def test_host_info1(self):
     expected_host_info = {
         'puppet_classes': [
             'base',
             'ldap::client::wmf-test-cluster',
             'exim::simple-mail-sender',
             'sudo::labs_project'
         ],
         'fqdn': 'i-000003d1',
         'address': '10.4.0.249',
         'puppet_vars': {
             'realm': 'labs',
             'instancecreator_email': '*****@*****.**',
             'instancecreator_username': '******',
             'instancecreator_lang': 'en', 'instanceproject': 'bots',
             'instancename': 'bots-cb-dev'
         },
         'name': 'bots-cb-dev'
     }
     puppet_vars = build.get_puppet_vars(self.instance1)
     host_info = build.get_host_info(self.instance1, puppet_vars)
     self.assertEqual(sorted(expected_host_info), sorted(host_info))
Exemplo n.º 3
0
 def test_groups2(self):
     expected_groups = ['ssh', 'bots', 'http']
     puppet_vars = build.get_puppet_vars(self.instance2)
     groups = build.get_host_groups(self.instance2, puppet_vars)
     self.assertEqual(sorted(groups), sorted(expected_groups))