You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/07/17 21:40:51 UTC

tinkerpop git commit: TINKERPOP-1552 Fixed authentication configuration problem in tests

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1552-master 9b02c1fa9 -> ab1dc62ce


TINKERPOP-1552 Fixed authentication configuration problem in tests

We factored out the "classname" and "credentialDbLocation" configuration options in the gremlin server yaml.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ab1dc62c
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ab1dc62c
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ab1dc62c

Branch: refs/heads/TINKERPOP-1552-master
Commit: ab1dc62ce67c66b589a56ceb95a970ed7b6169a5
Parents: 9b02c1f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jul 17 17:39:27 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Jul 17 17:39:27 2017 -0400

----------------------------------------------------------------------
 gremlin-dotnet/test/pom.xml | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ab1dc62c/gremlin-dotnet/test/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/pom.xml b/gremlin-dotnet/test/pom.xml
index 524bed0..cac449c 100644
--- a/gremlin-dotnet/test/pom.xml
+++ b/gremlin-dotnet/test/pom.xml
@@ -135,6 +135,7 @@ import org.apache.tinkerpop.gremlin.server.GremlinServer
 import org.apache.tinkerpop.gremlin.server.Settings
 import org.apache.tinkerpop.gremlin.server.Settings.ScriptEngineSettings
 import org.apache.tinkerpop.gremlin.server.Settings.SerializerSettings
+import java.util.Properties
 
 if (${skipTests}) return
 
@@ -151,13 +152,22 @@ server.start().join()
 project.setContextValue("gremlin.dotnet.server", server)
 log.info("Gremlin Server with no authentication started on port 45950")
 
+def securePropsFile = new File('${project.basedir}/target/tinkergraph-credentials.properties')
+if (!securePropsFile.exists()) {
+  securePropsFile.createNewFile()
+  securePropsFile << "gremlin.graph=org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph\n"
+  securePropsFile << "gremlin.tinkergraph.vertexIdManager=LONG\n"
+  securePropsFile << "gremlin.tinkergraph.graphLocation=${gremlin.server.dir}/data/credentials.kryo\n"
+  securePropsFile << "gremlin.tinkergraph.graphFormat=gryo"
+}
+
 def settingsSecure = Settings.read("${gremlin.server.dir}/conf/gremlin-server-modern.yaml")
 settingsSecure.graphs.graph = "${gremlin.server.dir}/conf/tinkergraph-empty.properties"
 settingsSecure.scriptEngines["gremlin-groovy"].plugins["org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin"].files = ["${gremlin.server.dir}/scripts/generate-modern.groovy"]
 settingsSecure.serializers << new SerializerSettings("org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0", [:])
 settingsSecure.port = 45951
-settingsSecure.authentication.className = "org.apache.tinkerpop.gremlin.server.auth.SimpleAuthenticator"
-settingsSecure.authentication.config = [credentialsDb: "${gremlin.server.dir}/conf/tinkergraph-credentials.properties", credentialsDbLocation: "${gremlin.server.dir}/data/credentials.kryo"]
+settingsSecure.authentication.authenticator = "org.apache.tinkerpop.gremlin.server.auth.SimpleAuthenticator"
+settingsSecure.authentication.config = [credentialsDb: "${project.basedir}/target/tinkergraph-credentials.properties"]
 
 def serverSecure = new GremlinServer(settingsSecure)
 serverSecure.start().join()