Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void testTypeMappingProject() throws Exception {
@Test
public void testOwnerParameterProject() throws Exception {
try {
final String PROJECT_NAME = "type-mapping-project";
final String PROJECT_NAME = "owner-param-project";
File testProject = ResourceExtractor.simpleExtractResources(getClass(), "/" + PROJECT_NAME);

Verifier verifier;
Expand All @@ -137,6 +137,27 @@ public void testOwnerParameterProject() throws Exception {
Assert.fail("Unexpected Exception running the test : " + e.getMessage());
}
}

@Test
public void testMinimalistProject() throws Exception {
try {
final String PROJECT_NAME = "minimalist-project";
File testProject = ResourceExtractor.simpleExtractResources(getClass(), "/" + PROJECT_NAME);

Verifier verifier;
verifier = new Verifier(testProject.getAbsolutePath());
verifier.addCliOption("-N");
verifier.addCliOption("-Dutplsql-maven-plugin-version=" + pluginVersion);
verifier.addCliOption("-DdbUrl=" + System.getProperty("dbUrl"));
verifier.addCliOption("-DdbUser=" + System.getProperty("dbUser"));
verifier.addCliOption("-DdbPass=" + System.getProperty("dbPass"));

verifier.executeGoal("test");
} catch (Exception e) {
e.printStackTrace();
Assert.fail("Unexpected Exception running the test : " + e.getMessage());
}
}

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<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>

<groupId>org.utplsql</groupId>
<artifactId>utplsql-maven-plugin-minimalist-test</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>

<name>utplsql-maven-plugin IT Minimalist</name>
<properties>
<!-- url, user, password are set with dbUrl, dbUser, dbPass system properties -->
</properties>

<build>
<plugins>
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>utplsql-maven-plugin</artifactId>
<version>${utplsql-maven-plugin-version}</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>

</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<coverage version="1">
<file path="src/test/resources/owner-param-project/scripts/sources/foo/package_bodies/PKG_TEST_ME.sql">
<file path="scripts/sources/foo/package_bodies/PKG_TEST_ME.sql">
<lineToCover lineNumber="8" covered="true"/>
<lineToCover lineNumber="9" covered="true"/>
<lineToCover lineNumber="10" covered="true"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<testExecutions version="1">
<file path="src/test/resources/owner-param-project/scripts/test/bar/package_bodies/TEST_PKG_TEST_ME.sql">
<file path="scripts/test/bar/package_bodies/TEST_PKG_TEST_ME.sql">
<testCase name="test_fc_input_1" duration="1" >
</testCase>
<testCase name="test_fc_input_0" duration="1" >
Expand Down
120 changes: 62 additions & 58 deletions utplsql-maven-plugin-it/src/it/resources/owner-param-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,69 +20,73 @@
<groupId>${project.groupId}</groupId>
<artifactId>utplsql-maven-plugin</artifactId>
<version>${utplsql-maven-plugin-version}</version>
<goals>
<goal>test</goal>
</goals>
<configuration>
<!-- Mandatory Attributes -->
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
<configuration>
<!-- Mandatory Attributes -->

<ignoreFailure>false</ignoreFailure>
<ignoreFailure>false</ignoreFailure>

<paths>
<path>tests_owner</path>
</paths>
<paths>
<path>tests_owner</path>
</paths>

<reporters>
<reporter>
<name>UT_COVERAGE_SONAR_REPORTER</name>
<fileOutput>utplsql/coverage-sonar-reporter.xml</fileOutput>
<consoleOutput>true</consoleOutput>
</reporter>
<reporter>
<name>UT_SONAR_TEST_REPORTER</name>
<fileOutput>utplsql/sonar-test-reporter.xml</fileOutput>
<consoleOutput>true</consoleOutput>
</reporter>
</reporters>
<reporters>
<reporter>
<name>UT_COVERAGE_SONAR_REPORTER</name>
<fileOutput>utplsql/coverage-sonar-reporter.xml</fileOutput>
<consoleOutput>true</consoleOutput>
</reporter>
<reporter>
<name>UT_SONAR_TEST_REPORTER</name>
<fileOutput>utplsql/sonar-test-reporter.xml</fileOutput>
<consoleOutput>true</consoleOutput>
</reporter>
</reporters>

<sources>
<source>
<directory>scripts/sources</directory>
<includes>
<include>**/*sql</include>
</includes>
</source>
</sources>
<sourcesOwner>code_owner</sourcesOwner>
<sourcesRegexExpression>.*/\w+/(\w+)/(\w+)\.\w{3}</sourcesRegexExpression>
<sourcesNameSubexpression>2</sourcesNameSubexpression>
<sourcesTypeSubexpression>1</sourcesTypeSubexpression>
<sourcesCustomTypeMapping>
<customTypeMapping>
<type>package body</type>
<customMapping>package_bodies</customMapping>
</customTypeMapping>
</sourcesCustomTypeMapping>
<sources>
<source>
<directory>scripts/sources</directory>
<includes>
<include>**/*sql</include>
</includes>
</source>
</sources>
<sourcesOwner>code_owner</sourcesOwner>
<sourcesRegexExpression>.*/\w+/(\w+)/(\w+)\.\w{3}</sourcesRegexExpression>
<sourcesNameSubexpression>2</sourcesNameSubexpression>
<sourcesTypeSubexpression>1</sourcesTypeSubexpression>
<sourcesCustomTypeMapping>
<customTypeMapping>
<type>package body</type>
<customMapping>package_bodies</customMapping>
</customTypeMapping>
</sourcesCustomTypeMapping>

<tests>
<test>
<directory>scripts/test</directory>
<includes>
<include>**/*sql</include>
</includes>
</test>
</tests>
<testsOwner>tests_owner</testsOwner>
<testsRegexExpression>.*/\w+/(\w+)/(\w+)\.\w{3}</testsRegexExpression>
<testsNameSubexpression>2</testsNameSubexpression>
<testsTypeSubexpression>1</testsTypeSubexpression>
<testsCustomTypeMapping>
<customTypeMapping>
<type>package body</type>
<customMapping>package_bodies</customMapping>
</customTypeMapping>
</testsCustomTypeMapping>
</configuration>
<tests>
<test>
<directory>scripts/test</directory>
<includes>
<include>**/*sql</include>
</includes>
</test>
</tests>
<testsOwner>tests_owner</testsOwner>
<testsRegexExpression>.*/\w+/(\w+)/(\w+)\.\w{3}</testsRegexExpression>
<testsNameSubexpression>2</testsNameSubexpression>
<testsTypeSubexpression>1</testsTypeSubexpression>
<testsCustomTypeMapping>
<customTypeMapping>
<type>package body</type>
<customMapping>package_bodies</customMapping>
</customTypeMapping>
</testsCustomTypeMapping>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
15 changes: 12 additions & 3 deletions utplsql-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
<java.version>1.8</java.version>
</properties>
<dependencies>

<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.5.2</version>
</dependency>

<dependency>
<groupId>org.utplsql</groupId>
Expand Down Expand Up @@ -54,8 +60,13 @@
</dependency>

<!-- test dependencies -->


<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.7.4</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
Expand Down Expand Up @@ -84,8 +95,6 @@
<version>3.8.0</version>
<scope>test</scope>
</dependency>


</dependencies>

<build>
Expand Down
Loading