Skip to content

Commit c802397

Browse files
committed
add proxy connection use
1 parent c7181c1 commit c802397

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

test/connection_test.go

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,35 @@ func TestConnection(t *testing.T) {
9898
return
9999
}
100100
if len(result.GetResultSets()) != 1 {
101-
return fmt.Errorf("unexpected result sets count: %d", len(result.GetResultSets()))
101+
return fmt.Errorf(
102+
"unexpected result sets count: %d",
103+
len(result.GetResultSets()),
104+
)
102105
}
103106
if len(result.GetResultSets()[0].GetColumns()) != 1 {
104-
return fmt.Errorf("unexpected colums count: %d", len(result.GetResultSets()[0].GetColumns()))
107+
return fmt.Errorf(
108+
"unexpected colums count: %d",
109+
len(result.GetResultSets()[0].GetColumns()),
110+
)
105111
}
106112
// nolint:goconst
107113
if result.GetResultSets()[0].GetColumns()[0].GetName() != "sum" {
108-
return fmt.Errorf("unexpected colum name: %s", result.GetResultSets()[0].GetColumns()[0].GetName())
114+
return fmt.Errorf(
115+
"unexpected colum name: %s",
116+
result.GetResultSets()[0].GetColumns()[0].GetName(),
117+
)
109118
}
110119
if len(result.GetResultSets()[0].GetRows()) != 1 {
111-
return fmt.Errorf("unexpected rows count: %d", len(result.GetResultSets()[0].GetRows()))
120+
return fmt.Errorf(
121+
"unexpected rows count: %d",
122+
len(result.GetResultSets()[0].GetRows()),
123+
)
112124
}
113125
if result.GetResultSets()[0].GetRows()[0].GetItems()[0].GetInt32Value() != 101 {
114-
return fmt.Errorf("unexpected result of select: %d", result.GetResultSets()[0].GetRows()[0].GetInt64Value())
126+
return fmt.Errorf(
127+
"unexpected result of select: %d",
128+
result.GetResultSets()[0].GetRows()[0].GetInt64Value(),
129+
)
115130
}
116131
return nil
117132
}, retry.WithIdempotent()); err != nil {
@@ -163,7 +178,9 @@ func TestConnection(t *testing.T) {
163178
})
164179
t.Run("export.ExportToS3", func(t *testing.T) {
165180
if err = retry.Retry(ctx, func(ctx context.Context) (err error) {
166-
exportClient := Ydb_Export_V1.NewExportServiceClient(db)
181+
exportClient := Ydb_Export_V1.NewExportServiceClient(db.With(
182+
ydb.WithCustomToken(""),
183+
))
167184
response, err := exportClient.ExportToS3(
168185
ctx,
169186
&Ydb_Export.ExportToS3Request{

0 commit comments

Comments
 (0)