diff --git a/README.md b/README.md index 4ecf7c721a41..ea5fe4321c7c 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,6 @@ __IntelliJ__ 1. Submit a pull request, referencing the relevant [Jira case](http://jira.pentaho.com/secure/Dashboard.jspa) 2. Attach a Git patch file to the relevant [Jira case](http://jira.pentaho.com/secure/Dashboard.jspa) -Use of the Pentaho checkstyle format (via `ant checkstyle` and reviewing the report) and developing working +Use of the Pentaho checkstyle format (via `mvn site` and reviewing the report) and developing working Unit Tests helps to ensure that pull requests for bugs and improvements are processed quickly. diff --git a/integration/README.md b/integration/README.md new file mode 100644 index 000000000000..43bcdd1a4d3b --- /dev/null +++ b/integration/README.md @@ -0,0 +1,5 @@ +# PDI Integration Tests + +**WARNING:** The tests contained in this module need review and update. They were not being actively ran +on the ant version of the project so the best course of action seemed to be moving them into their own +module considering they required several parts of the project to execute. \ No newline at end of file diff --git a/plugins/meta-inject/src/it/java/org/pentaho/di/trans/steps/denormaliser/DenormaliserMetaInjectionIT.java b/plugins/meta-inject/src/it/java/org/pentaho/di/trans/steps/denormaliser/DenormaliserMetaInjectionIT.java index 9010fc5ed9df..c2169c5d53dd 100644 --- a/plugins/meta-inject/src/it/java/org/pentaho/di/trans/steps/denormaliser/DenormaliserMetaInjectionIT.java +++ b/plugins/meta-inject/src/it/java/org/pentaho/di/trans/steps/denormaliser/DenormaliserMetaInjectionIT.java @@ -1,91 +1,91 @@ -/*! ****************************************************************************** - * - * Pentaho Data Integration - * - * Copyright (C) 2002-2016 by Pentaho : http://www.pentaho.com - * - ******************************************************************************* - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ******************************************************************************/ - -package org.pentaho.di.trans.steps.denormaliser; - -import static org.junit.Assert.assertEquals; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.pentaho.di.core.KettleEnvironment; -import org.pentaho.di.core.plugins.Plugin; -import org.pentaho.di.core.plugins.PluginInterface; -import org.pentaho.di.core.plugins.PluginRegistry; -import org.pentaho.di.core.plugins.PluginTypeInterface; -import org.pentaho.di.core.plugins.StepPluginType; -import org.pentaho.di.trans.Trans; -import org.pentaho.di.trans.TransMeta; -import org.pentaho.di.trans.step.StepMetaInterface; -import org.pentaho.di.trans.steps.metainject.MetaInject; -import org.pentaho.di.trans.steps.metainject.MetaInjectMeta; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DenormaliserMetaInjectionIT { - - private static final String EXPECTED_VALUE = " 1"; - - private TransMeta transMeta; - - private Trans trans; - - @BeforeClass - public static void initKettle() throws Exception { - KettleEnvironment.init( false ); - - Map, String> classMap = new HashMap<>(); - classMap.put( StepMetaInterface.class, "org.pentaho.di.trans.steps.metainject.MetaInjectMeta" ); - List libraries = new ArrayList<>(); - - PluginInterface plugin = - new Plugin( new String[] { "MetaInject" }, StepPluginType.class, StepMetaInterface.class, "Flow", - "MetaInjectMeta", null, null, false, false, classMap, libraries, null, null ); - PluginRegistry.getInstance().registerPlugin( StepPluginType.class, plugin ); - } - - @Before - public void setUp() throws Exception { - transMeta = new TransMeta( "src/it/resources/org/pentaho/di/trans/steps/denormaliser/pdi-11947.ktr" ); - transMeta.setTransformationType( TransMeta.TransformationType.Normal ); - trans = new Trans( transMeta ); - } - - @Test - public void testAddedFieldsAvalibleOutsideInjectedTransformation() throws Exception { - runTransformation( trans ); - String actualValue = trans.getVariable( "X_FIELD_VALUE" ); - assertEquals( EXPECTED_VALUE, actualValue ); - } - - private static void runTransformation( Trans trans ) throws Exception { - trans.prepareExecution( null ); - trans.startThreads(); - trans.waitUntilFinished(); - assertEquals( 0, trans.getErrors() ); - } - -} +/*! ****************************************************************************** + * + * Pentaho Data Integration + * + * Copyright (C) 2002-2017 by Pentaho : http://www.pentaho.com + * + ******************************************************************************* + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +package org.pentaho.di.trans.steps.denormaliser; + +import static org.junit.Assert.assertEquals; + +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.pentaho.di.core.KettleEnvironment; +import org.pentaho.di.core.plugins.Plugin; +import org.pentaho.di.core.plugins.PluginInterface; +import org.pentaho.di.core.plugins.PluginRegistry; +import org.pentaho.di.core.plugins.PluginTypeInterface; +import org.pentaho.di.core.plugins.StepPluginType; +import org.pentaho.di.trans.Trans; +import org.pentaho.di.trans.TransMeta; +import org.pentaho.di.trans.step.StepMetaInterface; +import org.pentaho.di.trans.steps.metainject.MetaInject; +import org.pentaho.di.trans.steps.metainject.MetaInjectMeta; + +import java.net.URL; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class DenormaliserMetaInjectionIT { + + private static final String EXPECTED_VALUE = "1"; + + private TransMeta transMeta; + + private Trans trans; + + @BeforeClass + public static void initKettle() throws Exception { + KettleEnvironment.init( false ); + + Map, String> classMap = new HashMap<>(); + classMap.put( StepMetaInterface.class, "org.pentaho.di.trans.steps.metainject.MetaInjectMeta" ); + List libraries = new ArrayList<>(); + + PluginInterface plugin = + new Plugin( new String[] { "MetaInject" }, StepPluginType.class, StepMetaInterface.class, "Flow", + "MetaInjectMeta", null, null, false, false, classMap, libraries, null, null ); + PluginRegistry.getInstance().registerPlugin( StepPluginType.class, plugin ); + } + + @Before + public void setUp() throws Exception { + transMeta = new TransMeta( "src/it/resources/org/pentaho/di/trans/steps/denormaliser/pdi-11947.ktr" ); + transMeta.setTransformationType( TransMeta.TransformationType.Normal ); + trans = new Trans( transMeta ); + } + + @Test + public void testAddedFieldsAvailableOutsideInjectedTransformation() throws Exception { + runTransformation( trans ); + String actualValue = trans.getVariable( "X_FIELD_VALUE" ); + assertEquals( EXPECTED_VALUE, actualValue ); + } + + private static void runTransformation( Trans trans ) throws Exception { + trans.prepareExecution( null ); + trans.startThreads(); + trans.waitUntilFinished(); + assertEquals( 0, trans.getErrors() ); + } + +} diff --git a/plugins/meta-inject/src/it/resources/org/pentaho/di/trans/steps/normaliser/normaliser-13761-expected-output.txt b/plugins/meta-inject/src/it/resources/org/pentaho/di/trans/steps/normaliser/normaliser-13761-expected-output.txt index 28a97239a7cf..a9fad1306d51 100644 --- a/plugins/meta-inject/src/it/resources/org/pentaho/di/trans/steps/normaliser/normaliser-13761-expected-output.txt +++ b/plugins/meta-inject/src/it/resources/org/pentaho/di/trans/steps/normaliser/normaliser-13761-expected-output.txt @@ -1,4 +1,4 @@ question;col1;col2;col3 -x; 1.0; 2.0; 3.0 -y; 4.0; 5.0; 6.0 -z; 7.0; 8.0; 9.0 +x;1.0;2.0;3.0 +y;4.0;5.0;6.0 +z;7.0;8.0;9.0 diff --git a/plugins/pur/core/pom.xml b/plugins/pur/core/pom.xml index 376ef20e476a..b4a64559ed4a 100644 --- a/plugins/pur/core/pom.xml +++ b/plugins/pur/core/pom.xml @@ -41,7 +41,9 @@ 1.9.5 1.3 1.3 - 3.2.14.RELEASE + 3.2.10.RELEASE + 4.1.3.RELEASE + 2.4.4.RELEASE 0.9 2.0 2.10.0 @@ -269,7 +271,67 @@ org.springframework spring-test - ${spring-test.version} + ${spring.framework.version} + test + + + org.springframework + spring-beans + ${spring.framework.version} + test + + + org.springframework + spring-core + ${spring.framework.version} + test + + + org.springframework + spring-context + ${spring.framework.version} + test + + + org.springframework + spring-expression + ${spring.framework.version} + test + + + org.springframework + spring-tx + ${spring.framework.version} + test + + + org.springframework + spring-context-support + ${spring.framework.version} + test + + + org.springframework + spring-orm + ${spring.framework.version} + test + + + org.springframework.webflow + spring-binding + ${spring.webflow.version} + test + + + org.springframework.security + spring-security-config + ${spring.security.version} + test + + + org.springframework.security + spring-security-core + ${spring.security.version} test @@ -390,6 +452,18 @@ + + + + + maven-failsafe-plugin + + true + + diff --git a/pom.xml b/pom.xml index 6d15e4847e66..b75a4a24dde4 100644 --- a/pom.xml +++ b/pom.xml @@ -301,16 +301,5 @@ assemblies - - integration-tests - - - runITs - - - - integration - -