-
Notifications
You must be signed in to change notification settings - Fork 81
Disable V8-dependent API tests for V2 since future arangods will ship… #722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
3642ecb
78d66c6
cb2476a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,9 @@ import ( | |
|
|
||
| func TestDatabaseTransaction(t *testing.T) { | ||
| c := createClient(t, nil) | ||
| skipBelowVersion(c, "3.2", t) | ||
| // for disabling v8 tests | ||
| skipAboveVersion(c, "3.12.6-1", t) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Minimum version check accidentally removed from transaction testThe |
||
|
|
||
| db := ensureDatabase(nil, c, "transaction_test", nil, t) | ||
| defer func() { | ||
| err := db.Remove(nil) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ import ( | |
| "github.com/stretchr/testify/require" | ||
|
|
||
| "github.com/arangodb/go-driver/v2/arangodb" | ||
| "github.com/arangodb/go-driver/v2/utils" | ||
| ) | ||
|
|
||
| func getTestMode() string { | ||
|
|
@@ -136,3 +137,27 @@ func skipVersionNotInRange(c arangodb.Client, ctx context.Context, minVersion, m | |
| } | ||
| return x | ||
| } | ||
|
|
||
| // requireV8Enabled skips the test if V8 is disabled in the ArangoDB server. | ||
| // V8 is required for features like tasks, UDFs, Foxx, JS transactions, and simple queries. | ||
| // This function checks the v8-version field in the version details. | ||
| // If v8-version is "none", V8 is disabled and the test will be skipped. | ||
| func requireV8Enabled(c arangodb.Client, ctx context.Context, t testing.TB) { | ||
| versionInfo, err := c.VersionWithOptions(ctx, &arangodb.GetVersionOptions{ | ||
| Details: utils.NewType(true), | ||
| }) | ||
| t.Logf("V8-Version %s", versionInfo.Details["v8-version"]) | ||
| if err != nil { | ||
| t.Fatalf("Failed to get version info with details: %s", err) | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Error checked after using potentially invalid resultThe |
||
|
|
||
| // Check if v8-version exists in Details and if it's "none" | ||
| if versionInfo.Details != nil { | ||
| if v8Version, ok := versionInfo.Details["v8-version"]; ok { | ||
| if v8VersionStr, ok := v8Version.(string); ok && v8VersionStr == "none" { | ||
| t.Skip("Skipping test: V8 is disabled in this ArangoDB server (v8-version: none). " + | ||
| "This test requires V8 enabled.") | ||
| } | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Test configuration comments may be accidentally committed
Commented-out test configuration lines referencing specific preview images (
enterprise-preview:2025-12-01-devel-d759089-amd64) andlocal-teststarter appear to be developer-specific test settings that were likely not intended to be committed. While harmless as comments, they add clutter and may confuse other contributors.