he1l0world commented on code in PR #11042: URL: https://github.com/apache/cloudstack/pull/11042#discussion_r2195758309
########## framework/spring/module/src/test/java/org/apache/cloudstack/spring/module/factory/ModuleBasedContextFactoryTest.java: ########## @@ -92,6 +90,51 @@ public void testBeans() throws IOException { testBeansInContext(set, "child1-1", 3, new String[] {"base", "child1", "child1-1"}, new String[] {"child2"}); } + @Test + public void testEmptyNameConfigResources() throws IOException { + ModuleDefinitionSet set = factory.loadModules(defs, "base"); + testConfigResourcesArray(new String[] {}, set.getConfigResources("")); + } + + @Test + public void testBaseConfigResources() throws IOException { + ModuleDefinitionSet set = factory.loadModules(defs, "base"); + testConfigResourcesArray(new String[] {"base-context.xml", "base-context-inheritable.xml"}, set.getConfigResources("base")); + } + + @Test + public void testChild1ConfigResources() throws IOException { + ModuleDefinitionSet set = factory.loadModules(defs, "base"); + testConfigResourcesArray(new String[] { + "child1-context.xml", "child1-context-inheritable.xml", + "base-context-inheritable.xml", "chil1-context-override.xml" + }, set.getConfigResources("child1")); + } + + @Test + public void testChild2ConfigResources() throws IOException { + ModuleDefinitionSet set = factory.loadModules(defs, "base"); + testConfigResourcesArray(new String[] { + "child2-context.xml", "base-context-inheritable.xml" + }, set.getConfigResources("child2")); + } + + @Test + public void testChild11ConfigResources() throws IOException { Review Comment: I updated it to `testChild1_1ConfigResources` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org