Author: matthieu Date: Mon Nov 2 13:36:34 2015 New Revision: 1711964 URL: http://svn.apache.org/viewvc?rev=1711964&view=rev Log: JAMES-1594 Introduce Cucumber tests on rewrite tables on each backend
Added: james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/RewriteTablesTest.java james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/XMLStepdefs.java james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/RewriteTablesTest.java james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/JDBCStepdefs.java james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/RewriteTablesTest.java james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPAStepdefs.java james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/RewriteTablesTest.java james/project/trunk/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java james/project/trunk/server/data/data-library/src/test/resources/ james/project/trunk/server/data/data-library/src/test/resources/cucumber/ james/project/trunk/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature Modified: james/project/trunk/server/data/data-file/pom.xml james/project/trunk/server/data/data-hbase/pom.xml james/project/trunk/server/data/data-jdbc/pom.xml james/project/trunk/server/data/data-jpa/pom.xml james/project/trunk/server/data/data-library/pom.xml james/project/trunk/server/pom.xml Modified: james/project/trunk/server/data/data-file/pom.xml URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-file/pom.xml?rev=1711964&r1=1711963&r2=1711964&view=diff ============================================================================== --- james/project/trunk/server/data/data-file/pom.xml (original) +++ james/project/trunk/server/data/data-file/pom.xml Mon Nov 2 13:36:34 2015 @@ -86,6 +86,16 @@ <!-- Test dependencies --> <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-java</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> Added: james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/RewriteTablesTest.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/RewriteTablesTest.java?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/RewriteTablesTest.java (added) +++ james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/RewriteTablesTest.java Mon Nov 2 13:36:34 2015 @@ -0,0 +1,32 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you 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.apache.james.rrt.file; + +import org.junit.runner.RunWith; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; + +@RunWith(Cucumber.class) +@CucumberOptions( + features = { "classpath:cucumber/" }, + glue = { "org.apache.james.rrt.lib", "org.apache.james.rrt.file" } + ) +public class RewriteTablesTest { +} Added: james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/XMLStepdefs.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/XMLStepdefs.java?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/XMLStepdefs.java (added) +++ james/project/trunk/server/data/data-file/src/test/java/org/apache/james/rrt/file/XMLStepdefs.java Mon Nov 2 13:36:34 2015 @@ -0,0 +1,30 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you 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.apache.james.rrt.file; + +import cucumber.api.java.en.Given; + +public class XMLStepdefs{ + + @Given("perform backend setup") + public void given() throws Throwable { + System.out.println("XML"); + } + +} Modified: james/project/trunk/server/data/data-hbase/pom.xml URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-hbase/pom.xml?rev=1711964&r1=1711963&r2=1711964&view=diff ============================================================================== --- james/project/trunk/server/data/data-hbase/pom.xml (original) +++ james/project/trunk/server/data/data-hbase/pom.xml Mon Nov 2 13:36:34 2015 @@ -104,6 +104,16 @@ <version>13.0</version> </dependency> <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-java</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> Added: james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java (added) +++ james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java Mon Nov 2 13:36:34 2015 @@ -0,0 +1,30 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you 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.apache.james.rrt.hbase; + +import cucumber.api.java.en.Given; + +public class HBaseStepdefs{ + + @Given("perform backend setup") + public void given() throws Throwable { + System.out.println("HBase"); + } + +} Added: james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/RewriteTablesTest.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/RewriteTablesTest.java?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/RewriteTablesTest.java (added) +++ james/project/trunk/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/RewriteTablesTest.java Mon Nov 2 13:36:34 2015 @@ -0,0 +1,32 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you 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.apache.james.rrt.hbase; + +import org.junit.runner.RunWith; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; + +@RunWith(Cucumber.class) +@CucumberOptions( + features = { "classpath:cucumber/" }, + glue = { "org.apache.james.rrt.lib", "org.apache.james.rrt.hbase" } + ) +public class RewriteTablesTest { +} Modified: james/project/trunk/server/data/data-jdbc/pom.xml URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jdbc/pom.xml?rev=1711964&r1=1711963&r2=1711964&view=diff ============================================================================== --- james/project/trunk/server/data/data-jdbc/pom.xml (original) +++ james/project/trunk/server/data/data-jdbc/pom.xml Mon Nov 2 13:36:34 2015 @@ -91,6 +91,16 @@ <!-- Test dependencies --> <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-java</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> Added: james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/JDBCStepdefs.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/JDBCStepdefs.java?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/JDBCStepdefs.java (added) +++ james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/JDBCStepdefs.java Mon Nov 2 13:36:34 2015 @@ -0,0 +1,30 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you 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.apache.james.rrt.jdbc; + +import cucumber.api.java.en.Given; + +public class JDBCStepdefs{ + + @Given("perform backend setup") + public void given() throws Throwable { + System.out.println("JDBC"); + } + +} Added: james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/RewriteTablesTest.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/RewriteTablesTest.java?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/RewriteTablesTest.java (added) +++ james/project/trunk/server/data/data-jdbc/src/test/java/org/apache/james/rrt/jdbc/RewriteTablesTest.java Mon Nov 2 13:36:34 2015 @@ -0,0 +1,32 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you 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.apache.james.rrt.jdbc; + +import org.junit.runner.RunWith; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; + +@RunWith(Cucumber.class) +@CucumberOptions( + features = { "classpath:cucumber/" }, + glue = { "org.apache.james.rrt.lib", "org.apache.james.rrt.jdbc" } + ) +public class RewriteTablesTest { +} Modified: james/project/trunk/server/data/data-jpa/pom.xml URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jpa/pom.xml?rev=1711964&r1=1711963&r2=1711964&view=diff ============================================================================== --- james/project/trunk/server/data/data-jpa/pom.xml (original) +++ james/project/trunk/server/data/data-jpa/pom.xml Mon Nov 2 13:36:34 2015 @@ -82,6 +82,16 @@ <!-- Test dependencies --> <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-java</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> Added: james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPAStepdefs.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPAStepdefs.java?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPAStepdefs.java (added) +++ james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/JPAStepdefs.java Mon Nov 2 13:36:34 2015 @@ -0,0 +1,30 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you 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.apache.james.rrt.jpa; + +import cucumber.api.java.en.Given; + +public class JPAStepdefs{ + + @Given("perform backend setup") + public void given() throws Throwable { + System.out.println("JPA"); + } + +} Added: james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/RewriteTablesTest.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/RewriteTablesTest.java?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/RewriteTablesTest.java (added) +++ james/project/trunk/server/data/data-jpa/src/test/java/org/apache/james/rrt/jpa/RewriteTablesTest.java Mon Nov 2 13:36:34 2015 @@ -0,0 +1,32 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you 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.apache.james.rrt.jpa; + +import org.junit.runner.RunWith; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; + +@RunWith(Cucumber.class) +@CucumberOptions( + features = { "classpath:cucumber/" }, + glue = { "org.apache.james.rrt.lib", "org.apache.james.rrt.jpa" } + ) +public class RewriteTablesTest { +} Modified: james/project/trunk/server/data/data-library/pom.xml URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-library/pom.xml?rev=1711964&r1=1711963&r2=1711964&view=diff ============================================================================== --- james/project/trunk/server/data/data-library/pom.xml (original) +++ james/project/trunk/server/data/data-library/pom.xml Mon Nov 2 13:36:34 2015 @@ -78,6 +78,16 @@ <!-- Test dependencies --> <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-java</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> Added: james/project/trunk/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java (added) +++ james/project/trunk/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java Mon Nov 2 13:36:34 2015 @@ -0,0 +1,41 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you 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.apache.james.rrt.lib; + +import cucumber.api.java.en.Given; +import cucumber.api.java.en.Then; +import cucumber.api.java.en.When; + +public class RewriteTablesStepdefs { + + @Given("i'm up") + public void given() throws Throwable { + System.out.println("i'm up"); + } + + @When("it's time") + public void when() throws Throwable { + System.out.println("it's time"); + } + + @Then("say hello") + public void then() throws Throwable { + System.out.println("say hello"); + } +} Added: james/project/trunk/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature?rev=1711964&view=auto ============================================================================== --- james/project/trunk/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature (added) +++ james/project/trunk/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature Mon Nov 2 13:36:34 2015 @@ -0,0 +1,7 @@ +Feature: Rewrite Tables tests + + Scenario: will say hello + Given i'm up + And perform backend setup + When it's time + Then say hello \ No newline at end of file Modified: james/project/trunk/server/pom.xml URL: http://svn.apache.org/viewvc/james/project/trunk/server/pom.xml?rev=1711964&r1=1711963&r2=1711964&view=diff ============================================================================== --- james/project/trunk/server/pom.xml (original) +++ james/project/trunk/server/pom.xml Mon Nov 2 13:36:34 2015 @@ -166,6 +166,7 @@ <spring-osgi-extender.version>1.2.1</spring-osgi-extender.version> <org.osgi.core.version>5.0.0</org.osgi.core.version> <guava.version>16.0</guava.version> + <cucumber.version>1.2.3</cucumber.version> <!-- karaf dependencies --> <exam.version>2.6.0</exam.version> @@ -1235,6 +1236,21 @@ <version>${hadoop.version}</version> </dependency> + <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-java</artifactId> + <version>${cucumber.version}</version> + </dependency> + <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-junit</artifactId> + <version>${cucumber.version}</version> + </dependency> + <dependency> + <groupId>info.cukes</groupId> + <artifactId>cucumber-picocontainer</artifactId> + <version>${cucumber.version}</version> + </dependency> </dependencies> </dependencyManagement> --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org