This is an automated email from the ASF dual-hosted git repository.

Cole-Greer pushed a commit to branch GValueFollowupTP4
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 7a622c1938a3ec8acaeb3f6b3433dd4226872801
Author: Cole Greer <[email protected]>
AuthorDate: Sun Jun 7 17:23:05 2026 -0700

    Add parameterize GValue feature-test variant to the Go GLV
    
    When PARAMETERIZE=true, usingTheParameterDefined wraps feature-test 
parameter
    values in gremlingo.NewGValue(name, value); docker-compose adds a second 
cucumber
    run with PARAMETERIZE=true. Mirrors Python's parameterize feature run.
---
 gremlin-go/docker-compose.yml                    | 1 +
 gremlin-go/driver/cucumber/cucumberSteps_test.go | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gremlin-go/docker-compose.yml b/gremlin-go/docker-compose.yml
index 37206156dd..8c1b1afcc1 100644
--- a/gremlin-go/docker-compose.yml
+++ b/gremlin-go/docker-compose.yml
@@ -60,6 +60,7 @@ services:
     command: >
       bash -c "go install 
github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
       && go test -v -json ./... -race -covermode=atomic 
-coverprofile=\"coverage.out\" -coverpkg=./... | gotestfmt
+      && PARAMETERIZE=true go test -v ./driver/cucumber/... -run 
TestCucumberFeatures
       && echo 'Running examples...'
       && go run examples/basic_gremlin.go
       && go run examples/connections.go
diff --git a/gremlin-go/driver/cucumber/cucumberSteps_test.go 
b/gremlin-go/driver/cucumber/cucumberSteps_test.go
index 2d72befcb7..41286b85a7 100644
--- a/gremlin-go/driver/cucumber/cucumberSteps_test.go
+++ b/gremlin-go/driver/cucumber/cucumberSteps_test.go
@@ -46,6 +46,7 @@ type tinkerPopGraph struct {
 }
 
 var parsers map[*regexp.Regexp]func(string, string) interface{}
+var parameterize = getEnvOrDefaultBool("PARAMETERIZE", false)
 
 func init() {
        parsers = map[*regexp.Regexp]func(string, string) interface{}{
@@ -918,7 +919,12 @@ func (tg *tinkerPopGraph) usingTheParameterDefined(name 
string, params string) e
        if tg.graphName == "empty" {
                tg.reloadEmptyData()
        }
-       tg.parameters[name] = parseValue(strings.Replace(params, "\\\"", "\"", 
-1), tg.graphName)
+       val := parseValue(strings.Replace(params, "\\\"", "\"", -1), 
tg.graphName)
+       if parameterize {
+               tg.parameters[name] = gremlingo.NewGValue(name, val)
+       } else {
+               tg.parameters[name] = val
+       }
        return nil
 }
 

Reply via email to