mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 12:12:08 +08:00
Merge branch 'refs/heads/dev'
This commit is contained in:
@@ -14,6 +14,7 @@ import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -50,6 +51,29 @@ public class AbsoluteConfigPathTest extends BaseTest {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledIf("isWindows")
|
||||
public void testAbsPath() throws Exception{
|
||||
Assertions.assertTrue(() -> {
|
||||
LiteflowConfig config = new LiteflowConfig();
|
||||
config.setRuleSource(StrUtil.format("{}\\sub\\**\\*.xml",rootDir));
|
||||
flowExecutor = FlowExecutorHolder.loadInstance(config);
|
||||
return flowExecutor.execute2Resp("chain1", "arg").isSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean isWindows() {
|
||||
try {
|
||||
String osName = System.getProperty("os.name");
|
||||
if (osName.isEmpty()) return false;
|
||||
else {
|
||||
return osName.contains("Windows");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@BeforeAll
|
||||
public static void createFiles() {
|
||||
rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath());
|
||||
|
||||
Reference in New Issue
Block a user