From 705ba74f529a50dbf700e528701b8c19bd65f028 Mon Sep 17 00:00:00 2001 From: Hua Jiang Date: Mon, 6 Dec 2021 17:29:11 +0800 Subject: [PATCH] [Fix-7195] The file path of 2.0.1-schema used a wrong separator. (#7200) --- .../mysql/dolphinscheduler_ddl.sql | 0 .../postgresql}/dolphinscheduler_ddl.sql | 0 .../dao/upgrade/SchemaUtilsTest.java | 16 ++++++++++++++++ 3 files changed, 16 insertions(+) rename dolphinscheduler-dao/src/main/resources/sql/upgrade/{2.0.1-schema => 2.0.1_schema}/mysql/dolphinscheduler_ddl.sql (100%) rename dolphinscheduler-dao/src/main/resources/sql/upgrade/{2.0.1-schema/postgre => 2.0.1_schema/postgresql}/dolphinscheduler_ddl.sql (100%) diff --git a/dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.1-schema/mysql/dolphinscheduler_ddl.sql b/dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.1_schema/mysql/dolphinscheduler_ddl.sql similarity index 100% rename from dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.1-schema/mysql/dolphinscheduler_ddl.sql rename to dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.1_schema/mysql/dolphinscheduler_ddl.sql diff --git a/dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.1-schema/postgre/dolphinscheduler_ddl.sql b/dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.1_schema/postgresql/dolphinscheduler_ddl.sql similarity index 100% rename from dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.1-schema/postgre/dolphinscheduler_ddl.sql rename to dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.1_schema/postgresql/dolphinscheduler_ddl.sql diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/upgrade/SchemaUtilsTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/upgrade/SchemaUtilsTest.java index b505709c25..7afd6b123e 100644 --- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/upgrade/SchemaUtilsTest.java +++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/upgrade/SchemaUtilsTest.java @@ -17,6 +17,11 @@ package org.apache.dolphinscheduler.dao.upgrade; +import org.apache.commons.collections.CollectionUtils; + +import java.io.IOException; +import java.util.List; + import org.junit.Assert; import org.junit.Test; @@ -57,4 +62,15 @@ public class SchemaUtilsTest { // This is expected } } + + @Test + public void testGetAllSchemaList() { + List list = null; + try { + list = SchemaUtils.getAllSchemaList(); + } catch (IOException ex) { + Assert.fail(ex.getMessage()); + } + Assert.assertFalse("Can not find any schema files", CollectionUtils.isEmpty(list)); + } }