diff --git a/cms-core/configs/media.toml b/cms-core/config/media.toml similarity index 100% rename from cms-core/configs/media.toml rename to cms-core/config/media.toml diff --git a/cms-core/configs/media.yaml b/cms-core/config/media.yaml similarity index 100% rename from cms-core/configs/media.yaml rename to cms-core/config/media.yaml diff --git a/cms-core/configs/server.toml b/cms-core/config/server.toml similarity index 100% rename from cms-core/configs/server.toml rename to cms-core/config/server.toml diff --git a/cms-core/configs/server.yaml b/cms-core/config/server.yaml similarity index 100% rename from cms-core/configs/server.yaml rename to cms-core/config/server.yaml diff --git a/cms-core/configs/site-dev.toml b/cms-core/config/site-dev.toml similarity index 100% rename from cms-core/configs/site-dev.toml rename to cms-core/config/site-dev.toml diff --git a/cms-core/configs/site.toml b/cms-core/config/site.toml similarity index 100% rename from cms-core/configs/site.toml rename to cms-core/config/site.toml diff --git a/cms-core/configs/taxonomy.tags.toml b/cms-core/config/taxonomy.tags.toml similarity index 100% rename from cms-core/configs/taxonomy.tags.toml rename to cms-core/config/taxonomy.tags.toml diff --git a/cms-core/configs/taxonomy.tags.yaml b/cms-core/config/taxonomy.tags.yaml similarity index 100% rename from cms-core/configs/taxonomy.tags.yaml rename to cms-core/config/taxonomy.tags.yaml diff --git a/cms-core/configs/taxonomy.toml b/cms-core/config/taxonomy.toml similarity index 100% rename from cms-core/configs/taxonomy.toml rename to cms-core/config/taxonomy.toml diff --git a/cms-core/configs/taxonomy.yaml b/cms-core/config/taxonomy.yaml similarity index 100% rename from cms-core/configs/taxonomy.yaml rename to cms-core/config/taxonomy.yaml diff --git a/cms-core/src/main/java/com/condation/cms/core/configuration/configs/TaxonomyConfiguration.java b/cms-core/src/main/java/com/condation/cms/core/configuration/configs/TaxonomyConfiguration.java index 464af957..00fe4a3d 100644 --- a/cms-core/src/main/java/com/condation/cms/core/configuration/configs/TaxonomyConfiguration.java +++ b/cms-core/src/main/java/com/condation/cms/core/configuration/configs/TaxonomyConfiguration.java @@ -107,8 +107,8 @@ public void reload () { private void loadValues(Taxonomy taxonomy) { try { - var yamlFile = "configs/taxonomy.%s.yaml".formatted(taxonomy.getSlug()); - var tomlFile = "configs/taxonomy.%s.toml".formatted(taxonomy.getSlug()); + var yamlFile = "config/taxonomy.%s.yaml".formatted(taxonomy.getSlug()); + var tomlFile = "config/taxonomy.%s.toml".formatted(taxonomy.getSlug()); var valueSrc = List.of( YamlConfigSource.build(hostBase.resolve(yamlFile)), diff --git a/cms-core/src/test/java/com/condation/cms/core/configuration/ConfigurationTest.java b/cms-core/src/test/java/com/condation/cms/core/configuration/ConfigurationTest.java index 367a88c1..cabb58c3 100644 --- a/cms-core/src/test/java/com/condation/cms/core/configuration/ConfigurationTest.java +++ b/cms-core/src/test/java/com/condation/cms/core/configuration/ConfigurationTest.java @@ -78,8 +78,8 @@ public void setup() throws IOException, SchedulerException { configuration = SimpleConfiguration.builder(eventBus) .id("test-config") .reloadStrategy(new CronReload("0/10 * * * * ?", cronScheduler)) - .addSource(YamlConfigSource.build(Path.of("configs/server.yaml"))) - .addSource(TomlConfigSource.build(Path.of("configs/server.toml"))) + .addSource(YamlConfigSource.build(Path.of("config/server.yaml"))) + .addSource(TomlConfigSource.build(Path.of("config/server.toml"))) .build(); } @@ -99,7 +99,7 @@ public void test_env() { @Test public void test_reload () throws InterruptedException, IOException { - FileUtils.touch(Path.of("configs/server.toml")); + FileUtils.touch(Path.of("config/server.toml")); Thread.sleep(Duration.ofSeconds(20)); diff --git a/cms-core/src/test/java/com/condation/cms/core/configuration/MediaConfigurationTest.java b/cms-core/src/test/java/com/condation/cms/core/configuration/MediaConfigurationTest.java index 76e3bae0..81616e99 100644 --- a/cms-core/src/test/java/com/condation/cms/core/configuration/MediaConfigurationTest.java +++ b/cms-core/src/test/java/com/condation/cms/core/configuration/MediaConfigurationTest.java @@ -21,16 +21,12 @@ * . * #L% */ -import com.condation.cms.core.configuration.configs.SimpleConfiguration; import com.condation.cms.core.configuration.source.TomlConfigSource; import com.condation.cms.core.configuration.source.YamlConfigSource; import com.condation.cms.api.eventbus.EventBus; import com.condation.cms.core.configuration.configs.MediaConfiguration; import java.io.IOException; import java.nio.file.Path; -import java.util.List; -import lombok.Data; -import lombok.NoArgsConstructor; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -55,8 +51,8 @@ public class MediaConfigurationTest { public void setup() throws IOException, SchedulerException { configuration = MediaConfiguration.builder(eventBus) .id("media-config") - .addSource(YamlConfigSource.build(Path.of("configs/media.yaml"))) - .addSource(TomlConfigSource.build(Path.of("configs/media.toml"))) + .addSource(YamlConfigSource.build(Path.of("config/media.yaml"))) + .addSource(TomlConfigSource.build(Path.of("config/media.toml"))) .build(); } diff --git a/cms-core/src/test/java/com/condation/cms/core/configuration/SiteConfigurationTest.java b/cms-core/src/test/java/com/condation/cms/core/configuration/SiteConfigurationTest.java index 5d6dfc66..13c66a63 100644 --- a/cms-core/src/test/java/com/condation/cms/core/configuration/SiteConfigurationTest.java +++ b/cms-core/src/test/java/com/condation/cms/core/configuration/SiteConfigurationTest.java @@ -23,15 +23,7 @@ */ import com.condation.cms.core.configuration.configs.SimpleConfiguration; -import com.condation.cms.core.configuration.source.TomlConfigSource; -import com.condation.cms.core.configuration.source.YamlConfigSource; -import com.condation.cms.api.SiteProperties; -import com.condation.cms.api.eventbus.EventBus; -import com.condation.cms.api.scheduler.CronJobContext; -import com.condation.cms.api.scheduler.CronJobScheduler; -import com.condation.cms.core.configuration.reload.CronReload; import com.condation.cms.core.configuration.properties.ExtendedSiteProperties; -import com.condation.cms.core.scheduler.SingleCronJobScheduler; import java.io.IOException; import java.nio.file.Path; import org.assertj.core.api.Assertions; @@ -39,11 +31,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.quartz.Scheduler; import org.quartz.SchedulerException; -import org.quartz.impl.StdSchedulerFactory; /** * @@ -57,7 +46,7 @@ public class SiteConfigurationTest { @BeforeEach public void setup() throws IOException, SchedulerException { - siteConfig = ConfigurationFactory.siteConfiguration("dev", Path.of("configs")); + siteConfig = ConfigurationFactory.siteConfiguration("dev", Path.of("config")); siteProperties = new ExtendedSiteProperties(siteConfig); } diff --git a/cms-core/src/test/java/com/condation/cms/core/configuration/TaxonomyConfigurationTest.java b/cms-core/src/test/java/com/condation/cms/core/configuration/TaxonomyConfigurationTest.java index a2f05c6d..fb6cc67e 100644 --- a/cms-core/src/test/java/com/condation/cms/core/configuration/TaxonomyConfigurationTest.java +++ b/cms-core/src/test/java/com/condation/cms/core/configuration/TaxonomyConfigurationTest.java @@ -53,8 +53,8 @@ public void setup() throws IOException, SchedulerException { configuration = TaxonomyConfiguration.builder(eventBus) .id("taxonomy-config") .hostBase(Path.of(".")) - .addSource(YamlConfigSource.build(Path.of("configs/taxonomy.yaml"))) - .addSource(TomlConfigSource.build(Path.of("configs/taxonomy.toml"))) + .addSource(YamlConfigSource.build(Path.of("config/taxonomy.yaml"))) + .addSource(TomlConfigSource.build(Path.of("config/taxonomy.toml"))) .build(); }