Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/W-13994115-do-not-merge #188

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
<properties>
<formatterConfigPath>../formatter.xml</formatterConfigPath>
<minMuleVersion>${mule.version}</minMuleVersion>
<munit.extensions.maven.plugin.version>1.1.2</munit.extensions.maven.plugin.version>
<munit.version>2.3.15</munit.version>

<munit.input.directory>src/test/munit</munit.input.directory>
<munit.output.directory>${basedir}/target/test-mule/munit</munit.output.directory>
<mavenResourcesVersion>3.2.0</mavenResourcesVersion>
</properties>

<build>
Expand Down Expand Up @@ -57,6 +63,50 @@
</replacements>
</configuration>
</plugin>

<plugin>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-extensions-maven-plugin</artifactId>
<version>${munit.extensions.maven.plugin.version}</version>
<dependencies>
<!-- MUnit Dependencies -->
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-tools</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
</dependency>
</dependencies>
</plugin>

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${mavenResourcesVersion}</version>
<executions>
<execution>
<id>copy-munit-resources</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${munit.output.directory}</outputDirectory>
<resources>
<resource>
<directory>${munit.input.directory}</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
32 changes: 32 additions & 0 deletions module/src/test/munit/CacheTestCases.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:java="http://www.mulesoft.org/schema/mule/java"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:munit="http://www.mulesoft.org/schema/mule/munit"
xmlns:munit-tools="http://www.mulesoft.org/schema/mule/munit-tools"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.mulesoft.org/schema/mule/spring" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/munit http://www.mulesoft.org/schema/mule/munit/current/mule-munit.xsd
http://www.mulesoft.org/schema/mule/munit-tools http://www.mulesoft.org/schema/mule/munit-tools/current/mule-munit-tools.xsd
http://www.mulesoft.org/schema/mule/java http://www.mulesoft.org/schema/mule/java/current/mule-java.xsd">
<munit:config name="CacheTestCases.xml" />

<spring:config name="springCacheConfig" files="cache/spring-cache-config.xml"/>

<object name="artifactObject" class="java.util.concurrent.atomic.AtomicInteger"/>

<object name="artifactObjectThatDependsOnSpringObject" class="org.mule.extension.spring.lifecycle.SpringLifecycleObject">
<property key="reference" value-ref="springObjectReferencingArtifactObject"/>
</object>
<flow name="dummy-springCache-flow" doc:id="4d3bc47e-5083-44b4-9345-2be7715df65a">
<logger level="INFO" doc:name="Logger" doc:id="b576a898-1cff-41e8-8861-a16dadeaa29d" />
</flow>

<munit:test name="SpringCacheTest" doc:id="f70750e8-dbfa-4844-8841-8937bb1a0761" description="Check that the beans config file that uses the cache namespace can be properly parsed">
<munit:execution >
<flow-ref doc:name="Flow-ref to dummy-springCache-flow" doc:id="3f34bae2-2387-46d3-9501-0b23806b4a69" name="dummy-springCache-flow"/>
</munit:execution>
</munit:test>

</mule>
57 changes: 56 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@
<name>Spring Module</name>
<packaging>pom</packaging>
<version>1.4.0-SNAPSHOT</version>


<properties>
<formatterConfigPath>formatter.xml</formatterConfigPath>
<springVersion>5.3.29</springVersion>
<springSecurityVersion>5.8.6</springSecurityVersion>
<mule.version>4.1.5</mule.version>
<gsonVersion>2.9.1</gsonVersion>

<munit.extensions.maven.plugin.version>1.1.2</munit.extensions.maven.plugin.version>
<munit.version>2.3.15</munit.version>

<munit.input.directory>src/test/munit</munit.input.directory>
<munit.output.directory>${basedir}/target/test-mule/munit</munit.output.directory>
<mavenResourcesVersion>3.2.0</mavenResourcesVersion>
</properties>

<modules>
Expand Down Expand Up @@ -114,4 +121,52 @@
<url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
</pluginRepository>
</pluginRepositories>

<build>
<plugins>
<plugin>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-extensions-maven-plugin</artifactId>
<version>${munit.extensions.maven.plugin.version}</version>
<dependencies>
<!-- MUnit Dependencies -->
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-tools</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
</dependency>
</dependencies>
</plugin>

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${mavenResourcesVersion}</version>
<executions>
<execution>
<id>copy-munit-resources</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${munit.output.directory}</outputDirectory>
<resources>
<resource>
<directory>${munit.input.directory}</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
52 changes: 50 additions & 2 deletions test-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
<artifactId>mule-spring-module-parent</artifactId>
<version>1.4.0-SNAPSHOT</version>
</parent>

<artifactId>mule-spring-test-plugin</artifactId>
<description>Mule plugin that has compile dependencies to spring. To use only in tests of extensions.</description>
<packaging>mule-extension</packaging>

<properties>
<formatterConfigPath>../formatter.xml</formatterConfigPath>
<munit.extensions.maven.plugin.version>1.1.2</munit.extensions.maven.plugin.version>
<munit.version>2.3.15</munit.version>

<munit.input.directory>src/test/munit</munit.input.directory>
<munit.output.directory>${basedir}/target/test-mule/munit</munit.output.directory>
<mavenResourcesVersion>3.2.0</mavenResourcesVersion>
</properties>

<build>
Expand All @@ -23,6 +29,48 @@
<extensions>true</extensions>
<version>${mule.app.plugins.maven.plugin.version}</version>
</plugin>
<plugin>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-extensions-maven-plugin</artifactId>
<version>${munit.extensions.maven.plugin.version}</version>
<dependencies>
<!-- MUnit Dependencies -->
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-tools</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${mavenResourcesVersion}</version>
<executions>
<execution>
<id>copy-munit-resources</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${munit.output.directory}</outputDirectory>
<resources>
<resource>
<directory>${munit.input.directory}</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
32 changes: 32 additions & 0 deletions test-plugin/src/test/munit/CacheTestCases.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:java="http://www.mulesoft.org/schema/mule/java"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:munit="http://www.mulesoft.org/schema/mule/munit"
xmlns:munit-tools="http://www.mulesoft.org/schema/mule/munit-tools"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.mulesoft.org/schema/mule/spring" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/munit http://www.mulesoft.org/schema/mule/munit/current/mule-munit.xsd
http://www.mulesoft.org/schema/mule/munit-tools http://www.mulesoft.org/schema/mule/munit-tools/current/mule-munit-tools.xsd
http://www.mulesoft.org/schema/mule/java http://www.mulesoft.org/schema/mule/java/current/mule-java.xsd">
<munit:config name="CacheTestCases.xml" />

<spring:config name="springCacheConfig" files="cache/spring-cache-config.xml"/>

<object name="artifactObject" class="java.util.concurrent.atomic.AtomicInteger"/>

<object name="artifactObjectThatDependsOnSpringObject" class="org.mule.extension.spring.lifecycle.SpringLifecycleObject">
<property key="reference" value-ref="springObjectReferencingArtifactObject"/>
</object>
<flow name="dummy-springCache-flow" doc:id="4d3bc47e-5083-44b4-9345-2be7715df65a">
<logger level="INFO" doc:name="Logger" doc:id="b576a898-1cff-41e8-8861-a16dadeaa29d" />
</flow>

<munit:test name="SpringCacheTest" doc:id="f70750e8-dbfa-4844-8841-8937bb1a0761" description="Check that the beans config file that uses the cache namespace can be properly parsed">
<munit:execution >
<flow-ref doc:name="Flow-ref to dummy-springCache-flow" doc:id="3f34bae2-2387-46d3-9501-0b23806b4a69" name="dummy-springCache-flow"/>
</munit:execution>
</munit:test>

</mule>
64 changes: 61 additions & 3 deletions tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@
<version>1.4.0-SNAPSHOT</version>
</parent>
<artifactId>mule-spring-module-tests</artifactId>
<!-- <packaging>mule-extension</packaging>-->

<properties>

<properties>
<httpcommons.httpclient.version>4.5.13</httpcommons.httpclient.version>

<formatterConfigPath>../formatter.xml</formatterConfigPath>

<munit.extensions.maven.plugin.version>1.1.2</munit.extensions.maven.plugin.version>
<munit.version>2.3.15</munit.version>

<munit.input.directory>src/test/munit</munit.input.directory>
<munit.output.directory>${basedir}/target/test-mule/munit</munit.output.directory>
<mavenResourcesVersion>3.2.0</mavenResourcesVersion>
</properties>

<dependencies>
Expand All @@ -34,7 +43,7 @@
<version>${project.version}</version>
<classifier>mule-plugin</classifier>
</dependency>

<dependency>
<groupId>org.mule.services</groupId>
<artifactId>mule-service-http</artifactId>
Expand Down Expand Up @@ -75,7 +84,7 @@
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.mule.tests</groupId>
<artifactId>mule-tests-runner</artifactId>
Expand Down Expand Up @@ -150,4 +159,53 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-extensions-maven-plugin</artifactId>
<version>${munit.extensions.maven.plugin.version}</version>
<dependencies>
<!-- MUnit Dependencies -->
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-tools</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
</dependency>
</dependencies>
</plugin>

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${mavenResourcesVersion}</version>
<executions>
<execution>
<id>copy-munit-resources</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${munit.output.directory}</outputDirectory>
<resources>
<resource>
<directory>${munit.input.directory}</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Loading