summaryrefslogtreecommitdiff
path: root/src/ri-it
diff options
context:
space:
mode:
Diffstat (limited to 'src/ri-it')
-rw-r--r--src/ri-it/classpath.txt63
-rw-r--r--src/ri-it/pom.xml42
-rw-r--r--src/ri-it/src/test/java/io/trygvis/rules/engine/AcmeAppsTestMain.java20
-rw-r--r--src/ri-it/src/test/java/io/trygvis/rules/engine/AcmeWireguardTestMain.java28
-rw-r--r--src/ri-it/src/test/java/io/trygvis/rules/engine/NinjaTestMain.java16
5 files changed, 169 insertions, 0 deletions
diff --git a/src/ri-it/classpath.txt b/src/ri-it/classpath.txt
new file mode 100644
index 0000000..0b29855
--- /dev/null
+++ b/src/ri-it/classpath.txt
@@ -0,0 +1,63 @@
+io.trygvis.rules-sandbox:ri-it:1.0-SNAPSHOT:jar
+ch.obermuhlner:big-math:2.0.0:jar
+ch.qos.logback:logback-classic:1.2.3:jar
+ch.qos.logback:logback-core:1.2.3:jar
+com.fasterxml.jackson.core:jackson-annotations:2.12.0:jar
+com.fasterxml.jackson.core:jackson-core:2.12.0:jar
+com.fasterxml.jackson.core:jackson-databind:2.12.0:jar
+com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.12.0:jar
+com.github.javaparser:javaparser-core:3.13.10:jar
+com.github.virtuald:curvesapi:1.06:jar
+com.google.code.findbugs:annotations:3.0.1:jar
+com.google.errorprone:error_prone_annotations:2.1.3:jar
+com.google.guava:guava:25.0-jre:jar
+com.google.j2objc:j2objc-annotations:1.1:jar
+com.google.re2j:re2j:1.2:jar
+com.googlecode.java-ipv6:java-ipv6:0.17:jar
+com.hubspot.jinjava:jinjava:2.5.6:jar
+com.thoughtworks.xstream:xstream:1.4.14:jar
+com.zaxxer:SparseBitSet:1.2:jar
+commons-codec:commons-codec:1.14:jar
+commons-io:commons-io:2.8.0:jar
+commons-net:commons-net:3.3:jar
+info.picocli:picocli:4.6.1:jar
+io.trygvis.rules-sandbox:ri-engine:1.0-SNAPSHOT:jar
+io.trygvis.rules-sandbox.module:ri-module-api:1.0-SNAPSHOT:jar
+org.antlr:antlr-runtime:3.5.2:jar
+org.apache.commons:commons-collections4:4.4:jar
+org.apache.commons:commons-compress:1.19:jar
+org.apache.commons:commons-lang3:3.10:jar
+org.apache.commons:commons-math3:3.6.1:jar
+org.apache.poi:poi:4.1.2:jar
+org.apache.poi:poi-ooxml:4.1.2:jar
+org.apache.poi:poi-ooxml-schemas:4.1.2:jar
+org.apache.xmlbeans:xmlbeans:3.1.0:jar
+org.checkerframework:checker-compat-qual:2.0.0:jar
+org.codehaus.mojo:animal-sniffer-annotations:1.14:jar
+org.drools:drools-canonical-model:7.48.0.Final:jar
+org.drools:drools-compiler:7.48.0.Final:jar
+org.drools:drools-core:7.48.0.Final:jar
+org.drools:drools-core-dynamic:7.48.0.Final:jar
+org.drools:drools-core-reflective:7.48.0.Final:jar
+org.drools:drools-decisiontables:7.48.0.Final:jar
+org.drools:drools-ecj:7.48.0.Final:jar
+org.drools:drools-model-compiler:7.48.0.Final:jar
+org.drools:drools-mvel:7.48.0.Final:jar
+org.drools:drools-mvel-compiler:7.48.0.Final:jar
+org.drools:drools-mvel-parser:7.48.0.Final:jar
+org.drools:drools-templates:7.48.0.Final:jar
+org.javassist:javassist:3.24.1-GA:jar
+org.jsoup:jsoup:1.10.3:jar
+org.kie:kie-api:7.48.0.Final:jar
+org.kie:kie-internal:7.48.0.Final:jar
+org.kie:kie-memory-compiler:7.48.0.Final:jar
+org.kie.soup:kie-soup-commons:7.48.0.Final:jar
+org.kie.soup:kie-soup-maven-support:7.48.0.Final:jar
+org.kie.soup:kie-soup-project-datamodel-api:7.48.0.Final:jar
+org.kie.soup:kie-soup-project-datamodel-commons:7.48.0.Final:jar
+org.kie.soup:kie-soup-xstream:7.48.0.Final:jar
+org.mvel:mvel2:2.4.11.Final:jar
+org.slf4j:slf4j-api:1.7.30:jar
+org.yaml:snakeyaml:1.26:jar
+xmlpull:xmlpull:1.1.3.1:jar
+xpp3:xpp3_min:1.1.4c:jar
diff --git a/src/ri-it/pom.xml b/src/ri-it/pom.xml
new file mode 100644
index 0000000..6ccefad
--- /dev/null
+++ b/src/ri-it/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>io.trygvis.rules-sandbox</groupId>
+ <artifactId>rules-sandbox</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>ri-it</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ri-engine</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.trygvis.rules-sandbox.module</groupId>
+ <artifactId>ri-base</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.trygvis.rules-sandbox.module</groupId>
+ <artifactId>ri-wireguard</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.trygvis.rules-sandbox.module</groupId>
+ <artifactId>acme</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/src/ri-it/src/test/java/io/trygvis/rules/engine/AcmeAppsTestMain.java b/src/ri-it/src/test/java/io/trygvis/rules/engine/AcmeAppsTestMain.java
new file mode 100644
index 0000000..a512daf
--- /dev/null
+++ b/src/ri-it/src/test/java/io/trygvis/rules/engine/AcmeAppsTestMain.java
@@ -0,0 +1,20 @@
+package io.trygvis.rules.engine;
+
+import io.trygvis.rules.engine.cli.RunCommand;
+
+import java.io.File;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+class AcmeAppsTestMain {
+ public static void main(String[] args) throws Exception {
+ var basedir = new File("example");
+ var c = new RunCommand();
+ c.name = "acme-apps";
+ c.input = new File[]{new File(basedir, "acme.yaml")};
+ c.outputState = new File(basedir, "db/apps.yaml");
+ c.agendaGroups = new String[]{"init", "generate"};
+ c.generatedOutput = new File(basedir, "acme-apps");
+ assertEquals(0, c.call());
+ }
+}
diff --git a/src/ri-it/src/test/java/io/trygvis/rules/engine/AcmeWireguardTestMain.java b/src/ri-it/src/test/java/io/trygvis/rules/engine/AcmeWireguardTestMain.java
new file mode 100644
index 0000000..243b07d
--- /dev/null
+++ b/src/ri-it/src/test/java/io/trygvis/rules/engine/AcmeWireguardTestMain.java
@@ -0,0 +1,28 @@
+package io.trygvis.rules.engine;
+
+import io.trygvis.rules.engine.cli.RunCommand;
+
+import java.io.File;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+class AcmeWireguardTestMain {
+ public static void main(String[] args) throws Exception {
+ var basedir = new File("example");
+ var c = new RunCommand();
+ c.name = "acme-wireguard";
+ c.input = new File[]{new File(basedir, "acme.yaml")};
+ c.outputState = new File(basedir, "db/wireguard.yaml");
+ c.agendaGroups = new String[]{"init", "generate"};
+ c.generatedOutput = new File(basedir, "acme-wireguard");
+ c.outputIncludes = new String[]{
+ "Wg*",
+ "Machine",
+ "DnsEntry",
+ "Ipv4Cidr",
+ "Ipv4Address",
+ };
+
+ assertEquals(0, c.call());
+ }
+}
diff --git a/src/ri-it/src/test/java/io/trygvis/rules/engine/NinjaTestMain.java b/src/ri-it/src/test/java/io/trygvis/rules/engine/NinjaTestMain.java
new file mode 100644
index 0000000..d62eec1
--- /dev/null
+++ b/src/ri-it/src/test/java/io/trygvis/rules/engine/NinjaTestMain.java
@@ -0,0 +1,16 @@
+package io.trygvis.rules.engine;
+
+import io.trygvis.rules.engine.cli.NinjaCommand;
+
+import java.io.File;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+class NinjaTestMain {
+ public static void main(String[] args) throws Exception {
+ var c = new NinjaCommand();
+ c.basedir = new File("example");
+
+ assertEquals(0, c.call());
+ }
+}