Merge branch 'refs/heads/dev'

This commit is contained in:
everywhere.z
2024-05-31 10:55:39 +08:00
146 changed files with 3786 additions and 202 deletions

View File

@@ -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());