修复一个单元测试路径上的bug
This commit is contained in:
		
							parent
							
								
									93e2331826
								
							
						
					
					
						commit
						b86c76302a
					
				| @ -20,7 +20,7 @@ public class TestYaml { | |||||||
|         String[] gatewayConfigPathList = { "test-gateway.yml", "test-gateway.yaml", "test-Gateway.yml", |         String[] gatewayConfigPathList = { "test-gateway.yml", "test-gateway.yaml", "test-Gateway.yml", | ||||||
|                 "test-Gateway.yaml" }; |                 "test-Gateway.yaml" }; | ||||||
|         for (String gatewayConfigPath : gatewayConfigPathList) { |         for (String gatewayConfigPath : gatewayConfigPathList) { | ||||||
|             inputStream = this.getClass().getResourceAsStream(gatewayConfigPath); |             inputStream = this.getClass().getClassLoader().getResourceAsStream(gatewayConfigPath); | ||||||
|             if (inputStream != null) { |             if (inputStream != null) { | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
| @ -42,7 +42,7 @@ public class TestYaml { | |||||||
| 
 | 
 | ||||||
|         Assert.assertEquals(defaultFilters.size(), 1); |         Assert.assertEquals(defaultFilters.size(), 1); | ||||||
|         Assert.assertEquals(defaultFilters.getClass(), ArrayList.class); |         Assert.assertEquals(defaultFilters.getClass(), ArrayList.class); | ||||||
|         Assert.assertEquals(defaultFilters.get(0), "AddResponseHeader=X-Response-Default-Foo, Default-Bar");  |         Assert.assertEquals(defaultFilters.get(0), "AddResponseHeader=X-Response-Default-Foo, Test-Default-Bar");  | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user