Validates that an HTTP URL defined config overrides the default values. @throws Exception thrown on any error
()
| 270 | * @throws Exception thrown on any error |
| 271 | */ |
| 272 | @SuppressWarnings("unchecked") |
| 273 | @Test |
| 274 | public void httpExternalConfigTest() throws Exception { |
| 275 | try { |
| 276 | final String url = newResponderForContent("/content", configToContent( |
| 277 | new ConfigArgP().getConfig(), |
| 278 | Collections.singletonMap("tsd.network.worker_threads", "7")), |
| 279 | "plain/text"); |
| 280 | ConfigArgP cap = new ConfigArgP("--config", url); // include overwrites config |
| 281 | Config config = cap.getConfig(); |
| 282 | assertEquals("The HTTP overriden value for key [tsd.network.worker_threads]", 7, config.getInt("tsd.network.worker_threads")); |
| 283 | } finally { |
| 284 | webServer.removeResponder("/content"); |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | /** |
| 289 | * Validates that an HTTP URL defined include successfully overrides |
nothing calls this directly
no test coverage detected