You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ly...@apache.org on 2022/05/19 21:43:28 UTC
[tinkerpop] branch 3.6-dev updated: Fixing cucumber test failures in gremlin-go
This is an automated email from the ASF dual-hosted git repository.
lyndonb pushed a commit to branch 3.6-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/3.6-dev by this push:
new 039d409337 Fixing cucumber test failures in gremlin-go
039d409337 is described below
commit 039d409337cf729374bc1bd5433f160badafbaf5
Author: Lyndon Bauto <ly...@bitquilltech.com>
AuthorDate: Thu May 19 14:43:13 2022 -0700
Fixing cucumber test failures in gremlin-go
---
gremlin-go/driver/cucumber/cucumberSteps_test.go | 28 +++++++++++++++++++++---
gremlin-go/driver/traversal.go | 4 ++++
2 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/gremlin-go/driver/cucumber/cucumberSteps_test.go b/gremlin-go/driver/cucumber/cucumberSteps_test.go
index 2d91e31268..ef4067825e 100644
--- a/gremlin-go/driver/cucumber/cucumberSteps_test.go
+++ b/gremlin-go/driver/cucumber/cucumberSteps_test.go
@@ -280,12 +280,34 @@ func toLambda(name, graphName string) interface{} {
func toT(name, graphName string) interface{} {
// Return as is, since T values are just strings.
- return name
+ if name == "label" {
+ return gremlingo.T.Label
+ } else if name == "id" {
+ return gremlingo.T.Id
+ } else if name == "key" {
+ return gremlingo.T.Key
+ } else if name == "value" {
+ return gremlingo.T.Value
+ } else {
+ return name
+ }
}
func toDirection(name, graphName string) interface{} {
- // Return as is, since direction values are just strings.
- return name
+ // Return as is, since Direction values are just strings.
+ if name == "IN" {
+ return gremlingo.Direction.In
+ } else if name == "OUT" {
+ return gremlingo.Direction.Out
+ } else if name == "BOTH" {
+ return gremlingo.Direction.Both
+ } else if name == "from" {
+ return gremlingo.Direction.From
+ } else if name == "to" {
+ return gremlingo.Direction.To
+ } else {
+ return name
+ }
}
func (tg *tinkerPopGraph) anUnsupportedTest() error {
diff --git a/gremlin-go/driver/traversal.go b/gremlin-go/driver/traversal.go
index aa18b4da10..9a82331b12 100644
--- a/gremlin-go/driver/traversal.go
+++ b/gremlin-go/driver/traversal.go
@@ -170,6 +170,8 @@ type directions struct {
In direction
Out direction
Both direction
+ From direction
+ To direction
}
// Direction is used to denote the direction of an Edge or location of a Vertex on an Edge.
@@ -177,6 +179,8 @@ var Direction = directions{
In: "IN",
Out: "OUT",
Both: "BOTH",
+ From: "OUT",
+ To: "IN",
}
type order string