Skip to content

Commit f6a6c13

Browse files
Removed unwanted code
1 parent 76bf110 commit f6a6c13

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

v2/arangodb/database_query_impl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ func (d databaseQuery) listAQLQueries(ctx context.Context, endpoint string, all
246246
// If both fail, return the unmarshal error
247247
return nil, fmt.Errorf("cannot unmarshal response into []RunningAQLQuery or object with result field: %s", string(rawResult))
248248
case http.StatusForbidden:
249-
// 🔍 Add custom 403 error message here
250-
return nil, fmt.Errorf("403 Forbidden: likely insufficient permissions to access /_api/query/%s", endpoint)
249+
// Add custom 403 error message here
250+
return nil, fmt.Errorf("403 Forbidden: likely insufficient permissions to access /_api/query/%s. Make sure the user has admin rights", endpoint)
251251
default:
252252
return nil, (&shared.ResponseStruct{}).AsArangoErrorWithCode(code)
253253
}

v2/tests/database_query_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -304,19 +304,6 @@ func Test_ListOfRunningAQLQueries(t *testing.T) {
304304
require.NoError(t, err)
305305
require.NotNil(t, queries)
306306
t.Logf("Current running queries (all=false): %d\n", len(queries))
307-
308-
// // Test with all=true parameter
309-
// t.Run("Test with all=true parameter", func(t *testing.T) {
310-
// allQueries, err := db.ListOfRunningAQLQueries(ctx, utils.NewType(true))
311-
// require.NoError(t, err)
312-
// require.NotNil(t, allQueries)
313-
// t.Logf("Current running queries (all=true): %d\n", len(allQueries))
314-
315-
// // The number with all=true should be >= the number with all=false
316-
// require.GreaterOrEqual(t, len(allQueries), len(queries),
317-
// "all=true should return >= queries than all=false")
318-
// })
319-
320307
t.Run("Test that queries are not empty", func(t *testing.T) {
321308

322309
// Create a context we can cancel

0 commit comments

Comments
 (0)