Skip to content

Commit

Permalink
Factor tck suite tooling into separate module
Browse files Browse the repository at this point in the history
o Remove old DatabaseConfigProvider cucumber plugin
o Restructure directory layout of db-config provisioning
  • Loading branch information
boggle committed Jun 17, 2016
1 parent a3a64d9 commit eeb04c3
Show file tree
Hide file tree
Showing 65 changed files with 252 additions and 98 deletions.
79 changes: 3 additions & 76 deletions community/cypher/compatibility-suite/pom.xml
Expand Up @@ -87,46 +87,6 @@

<!-- shared versions are defined in the parent pom -->

<dependency>
<groupId>org.opencypher</groupId>
<artifactId>tck</artifactId>
<version>${opencypher.version}</version>
</dependency>

<dependency>
<groupId>org.opencypher</groupId>
<artifactId>grammar</artifactId>
<version>${opencypher.version}</version>
</dependency>

<!-- JSON -->

<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<scope>test</scope>
</dependency>

<!-- Visualization -->

<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.19</version>
</dependency>

<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
<version>1.8</version>
</dependency>

<!-- scala -->

<dependency>
Expand All @@ -148,7 +108,6 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.scalautils</groupId>
<artifactId>scalautils_2.11</artifactId>
Expand All @@ -160,7 +119,6 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.scalacheck</groupId>
<artifactId>scalacheck_2.11</artifactId>
Expand All @@ -169,51 +127,35 @@

<!-- neo4j -->

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
</dependency>

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-3.1</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-spec-suite-tools</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<!-- neo4j testing -->

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-io</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>

Expand All @@ -224,20 +166,5 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>

<!-- other -->

<dependency>
<groupId>com.novus</groupId>
<artifactId>salat-core_2.11</artifactId>
<version>1.9.9</version>
<exclusions>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
</exclusions>
</dependency>

</dependencies>
</project>
Expand Up @@ -105,7 +105,7 @@ public static File targetDirectory( String suffix )

private static File obtainTargetDirectory( boolean create, String suffix )
{
File directory = new File( new File( "target" ), suffix );
File directory = new File( new File( "target" ), suffix ).getAbsoluteFile();
if ( !directory.exists() )
{
if ( !(create && directory.mkdirs()) )
Expand Down
Expand Up @@ -24,7 +24,7 @@ import cypher.{CompatibilitySuiteTest, UnpackedResources}

import scala.reflect.io.Path

class CypherTCKSteps extends SpecSuiteSteps {
class CompatibilitySuiteSteps extends SpecSuiteSteps {

override val requiredScenarioName: String = CompatibilitySuiteTest.SCENARIO_NAME_REQUIRED.trim.toLowerCase

Expand All @@ -51,14 +51,14 @@ class CypherTCKSteps extends SpecSuiteSteps {
"Fail when using property access on primitive type", // change error detail
"Fail when comparing nodes to relationships",
"Many CREATE clauses", // stack overflow
"Null-setting one property with ON CREATE", // wrong ouput format (?)
"Copying properties from node with ON CREATE", // wrong ouput format (?)
"Copying properties from node with ON MATCH", // wrong ouput format (?)
"Copying properties from literal map with ON CREATE", // wrong ouput format (?)
"Null-setting one property with ON CREATE", // wrong output format (?)
"Copying properties from node with ON CREATE", // wrong output format (?)
"Copying properties from node with ON MATCH", // wrong output format (?)
"Copying properties from literal map with ON CREATE", // wrong output format (?)
"Copying properties from literal map with ON MATCH" // wrong output format (?)
)

override val graphArchiveLibrary = new GraphArchiveLibrary(new GraphFileRepository(Path(UnpackedResources.targetDirectory("graphs").getAbsoluteFile)))
override val graphArchiveLibrary = new GraphArchiveLibrary(new GraphFileRepository(Path(UnpackedResources.targetDirectory("graphs"))))
}


1 change: 1 addition & 0 deletions community/cypher/pom.xml
Expand Up @@ -36,6 +36,7 @@
<module>frontend-3.1</module>
<module>cypher-compiler-3.1</module>
<module>cypher</module>
<module>spec-suite-tools</module>
<module>acceptance</module>
<module>compatibility-suite</module>
</modules>
Expand Down
Expand Up @@ -23,10 +23,6 @@ import java.nio.file.Files

import scala.reflect.io.Path

object GraphArchiveLibrary {
val default = new GraphArchiveLibrary(GraphFileRepository.default)
}

class GraphArchiveLibrary(val repository: GraphFileRepository) {

def recipe(name: String) = repository.graphRecipeLoader(name)
Expand Down
Expand Up @@ -21,24 +21,18 @@ package cypher.cucumber.db

import java.util.UUID

import cypher.UnpackedResources

import scala.reflect.io.{File, Path}

object GraphFileRepository {
val default = new GraphFileRepository(Path(UnpackedResources.targetDirectory("graphs").getAbsoluteFile))
}

class GraphFileRepository(graphs: Path) {
class GraphFileRepository(root: Path) {
self =>

val graphRecipeLoader = GraphRecipeLoader.forRepository(self)

def graphImportFile(name: String) = graphs / File(s"$name.json")
def graphScriptFile(name: String) = graphs / File(s"$name.cypher")
def graphArchivePath(descriptor: GraphArchive.Descriptor) = graphs / Path(descriptor.toString)
def graphImportFile(name: String) = root / File(s"$name.json")
def graphScriptFile(name: String) = root / File(s"$name.cypher")
def graphArchivePath(descriptor: GraphArchive.Descriptor) = root / Path(descriptor.toString)
def graphArchiveImportStatusFile(descriptor: GraphArchive.Descriptor) = graphArchivePath(descriptor) / "IMPORTED"
def temporarySnapshotPath = DeleteDirectory.onExit(graphs / Path(UUID.randomUUID().toString))
def temporarySnapshotPath = DeleteDirectory.onExit(root / Path(UUID.randomUUID().toString))
}


0 comments on commit eeb04c3

Please sign in to comment.