Validates that an HTTP URL defined include successfully overrides the default values. @throws Exception thrown on any error
()
| 291 | * @throws Exception thrown on any error |
| 292 | */ |
| 293 | @SuppressWarnings("unchecked") |
| 294 | @Test |
| 295 | public void httpIncludeOverrideTest() throws Exception { |
| 296 | try { |
| 297 | final String url = newResponderForContent("/content", configToContent( |
| 298 | new ConfigArgP().getConfig(), |
| 299 | Collections.singletonMap("tsd.network.worker_threads", "7")), |
| 300 | "plain/text"); |
| 301 | ConfigArgP cap = new ConfigArgP("--include", url); // include overwrites config |
| 302 | Config config = cap.getConfig(); |
| 303 | assertEquals("The HTTP overriden value for key [tsd.network.worker_threads]", 7, config.getInt("tsd.network.worker_threads")); |
| 304 | } finally { |
| 305 | webServer.removeResponder("/content"); |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | |
| 310 | /** |
nothing calls this directly
no test coverage detected