Exemplo n.º 1
0
 def test_refresh(self):
     service = self.mk_gce_service()
     instance = service.get_instance(self.gce['existing'][0])
     self.assertIsInstance(instance,
                           dict,
                           msg="GCE returns a dict of instance information")
     refreshed = service.refresh(instance)
     self.assertIsInstance(refreshed,
                           dict,
                           msg="GCE returns a dict of instance information")
Exemplo n.º 2
0
    def test_instance_in_use_addresses(self):
        service = self.mk_gce_service()
        instance = service.get_instance(
            self.gce['existing'][0])  # well known instance
        self.assertTrue(service.instance_in_use_addresses(instance))

        available_addrs, _ = service.get_available_addresses(count=1)
        self.assertFalse(
            service.instance_in_use_addresses(
                instance, '{}/32'.format(available_addrs[0])))
Exemplo n.º 3
0
 def test_get_instance(self):
     service = self.mk_azure_service()
     instance = service.get_instance(self.azure['existing'][0])
     self.assertTrue(instance)
Exemplo n.º 4
0
 def test__instance_boot_log(self):
     '''may not have boot diagnostics enabled... just for coverage'''
     service = self.mk_azure_service()
     instance = service.get_instance(self.azure['existing'][0])
     self.assertTrue(service._instance_boot_log(instance) or True)
Exemplo n.º 5
0
 def test_instance_in_use_addresses(self):
     service = self.mk_azure_service()
     instance = service.get_instance(
         self.azure['existing'][0])  # well known instance
     self.assertTrue(service.instance_in_use_addresses(instance))
Exemplo n.º 6
0
 def test_refresh(self):
     service = self.mk_aws_service()
     instance = service.get_instance(self.aws['existing'][0])
     self.assertIsInstance(instance, boto.ec2.instance.Instance)
     refreshed = service.refresh(instance)
     self.assertIsInstance(refreshed, boto.ec2.instance.Instance)
Exemplo n.º 7
0
 def test_get_instance(self):
     service = self.mk_aws_service()
     instance = service.get_instance(self.aws['existing'][0])
     self.assertIsInstance(instance, boto.ec2.instance.Instance)