Commits

Alek Mierzwicki committed 5b2dd7a

NONE Dropped support for JIRA<5.0. Using backdoor to restore data. Bumped version to 1.0.

Comments (0)

Files changed (2)

 <?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>
 
+<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>com.atlassian.pom</groupId>
 		<artifactId>atlassian-public-pom</artifactId>
 		<version>28</version>
 	</parent>
-
 	<groupId>com.atlassian.jira</groupId>
 	<artifactId>jira-nimble-func-tests</artifactId>
-	<version>0.2.3-SNAPSHOT</version>
+	<version>1.0-SNAPSHOT</version>
 	<packaging>jar</packaging>
-
 	<name>JIRA Nimble Functional Tests</name>
 	<description>Atlassian JIRA Nimble Functional Tests is functional tests runner for JUnit4.</description>
-
 	<licenses>
 		<license>
 			<name>Apache License, Version 2.0</name>
 			<distribution>repo</distribution>
 		</license>
 	</licenses>
-
 	<organization>
 		<name>Atlassian Pty Ltd</name>
 		<url>http://atlassian.com/</url>
 	</organization>
-
 	<scm>
 		<connection>scm:git:ssh://git@bitbucket.org/atlassian/jira-nimble-func-tests</connection>
 		<developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/jira-nimble-func-tests</developerConnection>
 		<url>http://bitbucket.org/atlassian/jira-nimble-func-tests</url>
 	</scm>
-
 	<issueManagement>
 		<system>bitbucket</system>
 		<url>https://bitbucket.org/atlassian/jira-nimble-func-tests/issues</url>
 	</issueManagement>
-
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<jira.version>4.2</jira.version>
-		<jira.data.version>4.2</jira.data.version>
-		<jira.test-lib.version>4.3-rc1</jira.test-lib.version>
+		<jira.version>5.0</jira.version>
+		<jira.data.version>5.0</jira.data.version>
+		<jira.test-lib.version>5.0</jira.test-lib.version>
 		<jdkLevel>1.6</jdkLevel>
 		<jersey.client.version>1.5</jersey.client.version>
+		<amps.version>4.1.1</amps.version>
+		<testkit.version>5.0.24</testkit.version>
+		<plugins>com.atlassian.jira.tests:jira-testkit-plugin:${testkit.version}</plugins>
 	</properties>
-
 	<build>
 		<testResources>
 			<testResource>
 			<plugin>
 				<groupId>com.atlassian.maven.plugins</groupId>
 				<artifactId>maven-jira-plugin</artifactId>
-				<version>3.11</version>
+				<version>${amps.version}</version>
 				<configuration>
 					<productVersion>${jira.version}</productVersion>
 					<productDataVersion>${jira.data.version}</productDataVersion>
 			</plugin>
 		</plugins>
 	</build>
-
 	<dependencies>
 		<dependency>
 			<groupId>com.google.guava</groupId>
 			</exclusions>
 		</dependency>
 		<dependency>
+			<groupId>com.atlassian.jira.tests</groupId>
+			<artifactId>jira-testkit-client</artifactId>
+			<version>${testkit.version}</version>
+		</dependency>
+		<dependency>
 			<groupId>com.google.code.findbugs</groupId>
 			<artifactId>jsr305</artifactId>
 			<version>1.3.7</version>
 			<version>0.6-m5</version>
 			<scope>test</scope>
 		</dependency>
-	</dependencies>
+		<dependency>
+			<groupId>org.apache.maven.plugins</groupId>
+			<artifactId>maven-failsafe-plugin</artifactId>
+			<version>2.9</version>
+			<scope>test</scope>
+		</dependency>
 
+	</dependencies>
 	<dependencyManagement>
 		<dependencies>
 			<dependency>
 			</dependency>
 		</dependencies>
 	</dependencyManagement>
-
 	<profiles>
 		<profile>
 			<id>jira-5.0</id>
-			<activation><activeByDefault>false</activeByDefault></activation>
 			<properties>
 				<jira.version>5.0</jira.version>
 				<jira.data.version>5.0</jira.data.version>
 			</properties>
 		</profile>
 		<profile>
-			<id>jira-4.2</id>
-			<activation><activeByDefault>false</activeByDefault></activation>
-			<properties>
-				<jira.version>4.2</jira.version>
-				<jira.data.version>4.2</jira.data.version>
-				<jira.test-lib.version>4.3-rc1</jira.test-lib.version>
-			</properties>
-		</profile>
-		<profile>
-			<id>jira-4.3.4</id>
-			<activation><activeByDefault>false</activeByDefault></activation>
-			<properties>
-				<jira.version>4.3.4</jira.version>
-				<jira.data.version>4.3.4</jira.data.version>
-				<jira.test-lib.version>4.3.4</jira.test-lib.version>
-			</properties>
-		</profile>
-		<profile>
-			<id>jira-4.4.1</id>
-			<activation><activeByDefault>false</activeByDefault></activation>
-			<properties>
-				<jira.version>4.4.1</jira.version>
-				<jira.data.version>4.4</jira.data.version>
-				<jira.test-lib.version>4.4</jira.test-lib.version>
-			</properties>
-		</profile>
-		<profile>
 			<id>jira-5.1</id>
-			<activation><activeByDefault>false</activeByDefault></activation>
 			<properties>
 				<jira.version>5.1-rc3</jira.version>
 				<jira.data.version>5.1-rc3</jira.data.version>
 			</properties>
 		</profile>
 	</profiles>
-    
-</project>
+</project>

src/main/java/com/atlassian/jira/nimblefunctests/framework/NimbleFuncTestCase.java

 import com.atlassian.jira.nimblefunctests.annotation.JiraBuildNumberDependent;
 import com.atlassian.jira.nimblefunctests.annotation.Restore;
 import com.atlassian.jira.nimblefunctests.annotation.RestoreOnce;
+import com.atlassian.jira.testkit.client.Backdoor;
+import com.atlassian.jira.testkit.client.util.TestKitLocalEnvironmentData;
 import com.atlassian.jira.webtests.util.JIRAEnvironmentData;
 import com.google.common.base.Objects;
 import com.google.common.base.Strings;
 	// }
 
 	private FakeFuncTestCase fakeFuncTestCase;
+	private Backdoor backdoor;
 
 	@BeforeClass
 	public static void beforeClass() {
 		if (rc.restoreMode == RestoreConfig.RestoreMode.RESTORE_ALWAYS ||
 				(rc.restoreMode == RestoreConfig.RestoreMode.RESTORE_ONCE && !wasRestorePerformed)) {
 
-			administration.restoreData(rc.restoreFile);
+			backdoor.restoreDataFromResource(rc.restoreFile);
 			wasRestorePerformed = true;
 		}
 	}
 			ftc.assertions = this.assertions;
 			ftc.text = this.text;
 			ftc.parse = this.parse;
+			ftc.backdoor = new Backdoor(new TestKitLocalEnvironmentData());
 			try {
 				// type of log field has changed (package refactor) - we need to get this field by name
 				final Field logField = this.getClass().getSuperclass().getDeclaredField("log");