mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	CLOUDSTACK-7304: Fixed Exception not raised issue in portable IP test cases
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
This commit is contained in:
		
							parent
							
								
									d75961d973
								
							
						
					
					
						commit
						d3f75618e7
					
				| @ -1218,8 +1218,7 @@ class TestDeleteAccount(cloudstackTestCase): | |||||||
|         # 2. Delete account |         # 2. Delete account | ||||||
|         # 3. Account should get deleted successfully |         # 3. Account should get deleted successfully | ||||||
| 
 | 
 | ||||||
|         try: |         portableip = PublicIPAddress.create( | ||||||
|             portableip = PublicIPAddress.create( |  | ||||||
|                                     self.apiclient, |                                     self.apiclient, | ||||||
|                                     accountid=self.account.name, |                                     accountid=self.account.name, | ||||||
|                                     zoneid=self.zone.id, |                                     zoneid=self.zone.id, | ||||||
| @ -1227,12 +1226,10 @@ class TestDeleteAccount(cloudstackTestCase): | |||||||
|                                     networkid=self.network.id, |                                     networkid=self.network.id, | ||||||
|                                     isportable=True |                                     isportable=True | ||||||
|                                     ) |                                     ) | ||||||
|             self.account.delete(self.apiclient) |         self.account.delete(self.apiclient) | ||||||
|             with self.assertRaises(Exception): |         list_publicips = PublicIPAddress.list(self.apiclient, | ||||||
|                 PublicIPAddress.list(self.apiclient, |                                        id=portableip.ipaddress.id) | ||||||
|                                  id=portableip.ipaddress.id) |         self.assertEqual(list_publicips, None, "List of ip addresses should be empty") | ||||||
|         except Exception as e: |  | ||||||
|             self.fail(e) |  | ||||||
|         return |         return | ||||||
| 
 | 
 | ||||||
|     @attr(tags=["advanced", "selfservice"]) |     @attr(tags=["advanced", "selfservice"]) | ||||||
| @ -1313,10 +1310,9 @@ class TestDeleteAccount(cloudstackTestCase): | |||||||
|         self.debug("Trying to list the ip address associated with deleted account, \ |         self.debug("Trying to list the ip address associated with deleted account, \ | ||||||
|                 should throw exception") |                 should throw exception") | ||||||
| 
 | 
 | ||||||
|         with self.assertRaises(Exception): |         list_publicips = PublicIPAddress.list(self.apiclient, | ||||||
|             PublicIPAddress.list(self.apiclient, |                                               id=portableip.ipaddress.id) | ||||||
|                                  id=portableip.ipaddress.id) |         self.assertEqual(list_publicips, None, "List of ip addresses should be empty") | ||||||
| 
 |  | ||||||
|         return |         return | ||||||
| 
 | 
 | ||||||
| class TestPortableIpTransferAcrossNetworks(cloudstackTestCase): | class TestPortableIpTransferAcrossNetworks(cloudstackTestCase): | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user