tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [46/50] [abbrv] tinkerpop git commit: TINKERPOP-1552 Fixed authentication configuration problem in tests
Date Tue, 18 Jul 2017 13:09:23 GMT
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/master
Commit: ab1dc62ce67c66b589a56ceb95a970ed7b6169a5
Parents: 9b02c1f
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Mon Jul 17 17:39:27 2017 -0400
Committer: Stephen Mallette <spmva@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()


Mime
View raw message