mirror of
				https://github.com/docker/compose.git
				synced 2025-10-31 19:24:21 +01:00 
			
		
		
		
	Fix tests to accommodate short-id container alias
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
		
							parent
							
								
									05bf9a054a
								
							
						
					
					
						commit
						6b71645ed7
					
				| @ -1162,7 +1162,10 @@ class CLITestCase(DockerClientTestCase): | ||||
|             ] | ||||
| 
 | ||||
|             for _, config in networks.items(): | ||||
|                 assert not config['Aliases'] | ||||
|                 # TODO: once we drop support for API <1.24, this can be changed to: | ||||
|                 # assert config['Aliases'] == [container.short_id] | ||||
|                 aliases = set(config['Aliases']) - set([container.short_id]) | ||||
|                 assert not aliases | ||||
| 
 | ||||
|     @v2_only() | ||||
|     def test_run_detached_connects_to_network(self): | ||||
| @ -1179,7 +1182,10 @@ class CLITestCase(DockerClientTestCase): | ||||
|         ] | ||||
| 
 | ||||
|         for _, config in networks.items(): | ||||
|             assert not config['Aliases'] | ||||
|             # TODO: once we drop support for API <1.24, this can be changed to: | ||||
|             # assert config['Aliases'] == [container.short_id] | ||||
|             aliases = set(config['Aliases']) - set([container.short_id]) | ||||
|             assert not aliases | ||||
| 
 | ||||
|         assert self.lookup(container, 'app') | ||||
|         assert self.lookup(container, 'db') | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user