Skip to content

Commit 5bd342d

Browse files
committed
fixed integration tests after removed ydb 23.3 from matrix
1 parent 6a8c400 commit 5bd342d

14 files changed

+14
-108
lines changed

tests/integration/driver_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232
"github.com/ydb-platform/ydb-go-sdk/v3/config"
3333
"github.com/ydb-platform/ydb-go-sdk/v3/internal/credentials"
3434
"github.com/ydb-platform/ydb-go-sdk/v3/internal/meta"
35-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
3635
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xtest"
3736
"github.com/ydb-platform/ydb-go-sdk/v3/log"
3837
"github.com/ydb-platform/ydb-go-sdk/v3/retry"
@@ -172,9 +171,6 @@ func TestDriver(sourceTest *testing.T) {
172171
}
173172
}()
174173
t.RunSynced("WithStaticCredentials", func(t *xtest.SyncedTest) {
175-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
176-
t.Skip("read rows not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
177-
}
178174
db, err := ydb.Open(ctx,
179175
os.Getenv("YDB_CONNECTION_STRING"),
180176
ydb.WithAccessTokenCredentials(

tests/integration/query_execute_script_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,12 @@ import (
1414
"github.com/stretchr/testify/require"
1515

1616
"github.com/ydb-platform/ydb-go-sdk/v3"
17-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
1817
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xtest"
1918
"github.com/ydb-platform/ydb-go-sdk/v3/query"
2019
"github.com/ydb-platform/ydb-go-sdk/v3/table/types"
2120
)
2221

2322
func TestQueryExecuteScript(sourceTest *testing.T) {
24-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
25-
sourceTest.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
26-
}
27-
2823
t := xtest.MakeSyncedTest(sourceTest)
2924
var (
3025
folder = t.Name()

tests/integration/query_execute_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ import (
2929
)
3030

3131
func TestQueryExecute(t *testing.T) {
32-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
33-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
34-
}
35-
3632
ctx, cancel := context.WithCancel(xtest.Context(t))
3733
defer cancel()
3834

@@ -297,10 +293,6 @@ func TestQueryExecute(t *testing.T) {
297293

298294
// https://github.com/ydb-platform/ydb-go-sdk/issues/1456
299295
func TestIssue1456TooManyUnknownTransactions(t *testing.T) {
300-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
301-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
302-
}
303-
304296
ctx, cancel := context.WithCancel(xtest.Context(t))
305297
defer cancel()
306298

@@ -411,10 +403,6 @@ func TestIssue1456TooManyUnknownTransactions(t *testing.T) {
411403
}
412404

413405
func TestQueryResultSet(t *testing.T) {
414-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
415-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
416-
}
417-
418406
t.Run("OK", func(t *testing.T) {
419407
scope := newScope(t)
420408

tests/integration/query_multi_result_sets_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,12 @@ import (
88
"errors"
99
"fmt"
1010
"io"
11-
"os"
1211
"testing"
1312

14-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
1513
"github.com/ydb-platform/ydb-go-sdk/v3/query"
1614
)
1715

1816
func TestQueryMultiResultSets(t *testing.T) {
19-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
20-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
21-
}
22-
2317
scope := newScope(t)
2418
var i, j, k int
2519
db := scope.Driver()

tests/integration/query_range_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,11 @@ import (
1515

1616
"github.com/ydb-platform/ydb-go-sdk/v3"
1717
"github.com/ydb-platform/ydb-go-sdk/v3/internal/value"
18-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
1918
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xtest"
2019
"github.com/ydb-platform/ydb-go-sdk/v3/query"
2120
)
2221

2322
func TestQueryRange(t *testing.T) {
24-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
25-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
26-
}
27-
2823
ctx, cancel := context.WithCancel(xtest.Context(t))
2924
defer cancel()
3025

tests/integration/query_read_row_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,13 @@ import (
1212
"github.com/stretchr/testify/require"
1313

1414
"github.com/ydb-platform/ydb-go-sdk/v3"
15-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
1615
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xtest"
1716
"github.com/ydb-platform/ydb-go-sdk/v3/log"
1817
"github.com/ydb-platform/ydb-go-sdk/v3/query"
1918
"github.com/ydb-platform/ydb-go-sdk/v3/trace"
2019
)
2120

2221
func TestQueryReadRow(t *testing.T) {
23-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
24-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
25-
}
26-
2722
ctx, cancel := context.WithCancel(xtest.Context(t))
2823
defer cancel()
2924

tests/integration/query_regression_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"errors"
99
"fmt"
1010
"io"
11-
"os"
1211
"strconv"
1312
"strings"
1413
"testing"
@@ -19,7 +18,6 @@ import (
1918
"github.com/ydb-platform/ydb-go-sdk/v3"
2019
"github.com/ydb-platform/ydb-go-sdk/v3/internal/query/options"
2120
"github.com/ydb-platform/ydb-go-sdk/v3/internal/query/tx"
22-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
2321
"github.com/ydb-platform/ydb-go-sdk/v3/query"
2422
"github.com/ydb-platform/ydb-go-sdk/v3/table"
2523
"github.com/ydb-platform/ydb-go-sdk/v3/table/types"
@@ -277,10 +275,6 @@ SELECT $val`,
277275

278276
// https://github.com/ydb-platform/ydb-go-sdk/issues/1506
279277
func TestIssue1506TypedNullPushdown(t *testing.T) {
280-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
281-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
282-
}
283-
284278
scope := newScope(t)
285279
ctx := scope.Ctx
286280
db := scope.Driver()
@@ -312,10 +306,6 @@ SELECT CAST($arg1 AS Utf8) AS v1, CAST($arg2 AS Utf8) AS v2
312306
}
313307

314308
func TestReadTwoPartsIntoMemoryIssue1559(t *testing.T) {
315-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
316-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
317-
}
318-
319309
scope := newScope(t)
320310

321311
var readPartCount int

tests/integration/query_tx_execute_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"context"
88
"errors"
99
"fmt"
10-
"os"
1110
"testing"
1211

1312
"github.com/stretchr/testify/require"
@@ -16,15 +15,10 @@ import (
1615
"github.com/ydb-platform/ydb-go-sdk/v3"
1716
internalQuery "github.com/ydb-platform/ydb-go-sdk/v3/internal/query"
1817
baseTx "github.com/ydb-platform/ydb-go-sdk/v3/internal/tx"
19-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
2018
"github.com/ydb-platform/ydb-go-sdk/v3/query"
2119
)
2220

2321
func TestQueryTxExecute(t *testing.T) {
24-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
25-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
26-
}
27-
2822
scope := newScope(t)
2923

3024
t.Run("Default", func(t *testing.T) {
@@ -243,10 +237,6 @@ func TestQueryTxExecute(t *testing.T) {
243237
}
244238

245239
func TestQueryLazyTxExecute(t *testing.T) {
246-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
247-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
248-
}
249-
250240
scope := newScope(t)
251241

252242
var (
@@ -457,10 +447,6 @@ func TestQueryLazyTxExecute(t *testing.T) {
457447
}
458448

459449
func TestQueryWithCommitTxFlag(t *testing.T) {
460-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
461-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
462-
}
463-
464450
scope := newScope(t)
465451
var count uint64
466452
err := scope.DriverWithLogs().Query().Do(scope.Ctx, func(ctx context.Context, s query.Session) error {

tests/integration/retry_budget_test.go

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"github.com/stretchr/testify/require"
1515

1616
"github.com/ydb-platform/ydb-go-sdk/v3"
17-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
1817
"github.com/ydb-platform/ydb-go-sdk/v3/internal/xtest"
1918
"github.com/ydb-platform/ydb-go-sdk/v3/query"
2019
"github.com/ydb-platform/ydb-go-sdk/v3/retry"
@@ -91,18 +90,16 @@ func TestRetryBudget(t *testing.T) {
9190
}, table.WithRetryBudget(retryBudget))
9291
require.ErrorIs(t, err, budget.ErrNoQuota)
9392
})
94-
if version.Gte(os.Getenv("YDB_VERSION"), "24.1") {
95-
t.Run("db.Query().Do", func(t *testing.T) {
96-
err := nativeDriver.Query().Do(ctx, func(ctx context.Context, s query.Session) error {
97-
return retry.RetryableError(errors.New("custom error"))
98-
}, query.WithRetryBudget(retryBudget))
99-
require.ErrorIs(t, err, budget.ErrNoQuota)
100-
})
101-
t.Run("db.Query().DoTx", func(t *testing.T) {
102-
err := nativeDriver.Query().DoTx(ctx, func(ctx context.Context, tx query.TxActor) error {
103-
return retry.RetryableError(errors.New("custom error"))
104-
}, query.WithRetryBudget(retryBudget))
105-
require.ErrorIs(t, err, budget.ErrNoQuota)
106-
})
107-
}
93+
t.Run("db.Query().Do", func(t *testing.T) {
94+
err := nativeDriver.Query().Do(ctx, func(ctx context.Context, s query.Session) error {
95+
return retry.RetryableError(errors.New("custom error"))
96+
}, query.WithRetryBudget(retryBudget))
97+
require.ErrorIs(t, err, budget.ErrNoQuota)
98+
})
99+
t.Run("db.Query().DoTx", func(t *testing.T) {
100+
err := nativeDriver.Query().DoTx(ctx, func(ctx context.Context, tx query.TxActor) error {
101+
return retry.RetryableError(errors.New("custom error"))
102+
}, query.WithRetryBudget(retryBudget))
103+
require.ErrorIs(t, err, budget.ErrNoQuota)
104+
})
108105
}

tests/integration/sugar_result_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"github.com/stretchr/testify/require"
1313

1414
"github.com/ydb-platform/ydb-go-sdk/v3"
15-
"github.com/ydb-platform/ydb-go-sdk/v3/internal/version"
1615
"github.com/ydb-platform/ydb-go-sdk/v3/query"
1716
"github.com/ydb-platform/ydb-go-sdk/v3/sugar"
1817
"github.com/ydb-platform/ydb-go-sdk/v3/table"
@@ -21,10 +20,6 @@ import (
2120
)
2221

2322
func TestSugarResult(t *testing.T) {
24-
if version.Lt(os.Getenv("YDB_VERSION"), "24.1") {
25-
t.Skip("query service not allowed in YDB version '" + os.Getenv("YDB_VERSION") + "'")
26-
}
27-
2823
ctx, cancel := context.WithCancel(context.Background())
2924
defer cancel()
3025

0 commit comments

Comments
 (0)