Skip to content

Commit 737858e

Browse files
committed
23.3 integration tests
1 parent 2ed2056 commit 737858e

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
go-version: [1.17.x, 1.20.x, 1.21.x]
48-
ydb-version: [22.5, 23.1, 23.2, 23.2-slim]
48+
ydb-version: [22.5, 23.1, 23.2, 23.3]
4949
services:
5050
ydb:
5151
image: cr.yandex/yc/yandex-docker-local-ydb:${{ matrix.ydb-version }}

tests/integration/kv_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ func TestKeyValue(t *testing.T) {
4040

4141
// get
4242
err = driver.Table().Do(scope.Ctx, func(ctx context.Context, s table.Session) error {
43-
rows, err := s.ReadRows(ctx, tablePath, types.ListValue(types.Int64Value(id)),
43+
rows, err := s.ReadRows(ctx, tablePath,
44+
types.ListValue(types.StructValue(
45+
types.StructFieldValue("id", types.Int64Value(id)),
46+
)),
4447
options.ReadColumn("val"),
4548
)
4649
if err != nil {
@@ -49,10 +52,10 @@ func TestKeyValue(t *testing.T) {
4952
defer func() {
5053
_ = rows.Close()
5154
}()
52-
if !rows.HasNextResultSet() {
55+
if !rows.NextResultSet(ctx) {
5356
return fmt.Errorf("no result sets")
5457
}
55-
if !rows.HasNextRow() {
58+
if !rows.NextRow() {
5659
return fmt.Errorf("no rows")
5760
}
5861
if rows.CurrentResultSet().RowCount() != 1 {
@@ -61,10 +64,11 @@ func TestKeyValue(t *testing.T) {
6164
if rows.CurrentResultSet().ColumnCount() != 1 {
6265
return fmt.Errorf("wrong column count (%d)", rows.CurrentResultSet().ColumnCount())
6366
}
64-
var actualValue int64
65-
if err := rows.ScanNamed(named.Optional("val", &actualValue)); err != nil {
67+
var actualValue string
68+
if err := rows.ScanNamed(named.OptionalWithDefault("val", &actualValue)); err != nil {
6669
return err
6770
}
71+
t.Logf("%s[%d] = %q", tablePath, id, actualValue)
6872
return rows.Err()
6973
})
7074
scope.Require.NoError(err)

0 commit comments

Comments
 (0)