Skip to content

Commit

Permalink
Fix linter complainings
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyisaev2 committed Dec 6, 2024
1 parent 91d522f commit 468fe2c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/server/datasource/rdbms/logging/prefix_getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"fmt"
"path"

"go.uber.org/zap"

api_service_protos "github.com/ydb-platform/fq-connector-go/api/service/protos"
rdbms_ydb "github.com/ydb-platform/fq-connector-go/app/server/datasource/rdbms/ydb"
"go.uber.org/zap"

"github.com/ydb-platform/ydb-go-sdk/v3"
)
Expand Down Expand Up @@ -37,7 +38,6 @@ func (p *prefixGetter) GetPrefix(
}

Check warning on line 38 in app/server/datasource/rdbms/logging/prefix_getter.go

View check run for this annotation

Codecov / codecov/patch

app/server/datasource/rdbms/logging/prefix_getter.go#L27-L38

Added lines #L27 - L38 were not covered by tests

return path.Join(response.databaseName, response.tableName), nil

Check warning on line 40 in app/server/datasource/rdbms/logging/prefix_getter.go

View check run for this annotation

Codecov / codecov/patch

app/server/datasource/rdbms/logging/prefix_getter.go#L40

Added line #L40 was not covered by tests

}

func NewPrefixGetter(resolver Resolver) rdbms_ydb.PrefixGetter {
Expand Down
9 changes: 5 additions & 4 deletions app/server/datasource/rdbms/ydb/prefix_getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"path"

api_service_protos "github.com/ydb-platform/fq-connector-go/api/service/protos"
"github.com/ydb-platform/ydb-go-sdk/v3"
"go.uber.org/zap"

api_service_protos "github.com/ydb-platform/fq-connector-go/api/service/protos"
)

type PrefixGetter interface {
Expand All @@ -19,9 +20,9 @@ type PrefixGetter interface {

type prefixGetterImpl struct{}

func (p prefixGetterImpl) GetPrefix(
ctx context.Context,
logger *zap.Logger,
func (prefixGetterImpl) GetPrefix(
_ context.Context,
_ *zap.Logger,
db *ydb.Driver,
request *api_service_protos.TDescribeTableRequest,
) (string, error) {
Expand Down
7 changes: 3 additions & 4 deletions app/server/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,10 @@ func validateDataSourceInstance(logger *zap.Logger, dsi *api_common.TDataSourceI
case api_common.EDataSourceKind_DATA_SOURCE_KIND_UNSPECIFIED:
return fmt.Errorf("empty kind: %w", common.ErrInvalidRequest)
case api_common.EDataSourceKind_LOGGING:

Check warning on line 85 in app/server/validate.go

View check run for this annotation

Codecov / codecov/patch

app/server/validate.go#L83-L85

Added lines #L83 - L85 were not covered by tests
break
case api_common.EDataSourceKind_ORACLE:
validators = append(validators, validateEndpoint, validateUseTls(logger))
validators = append(validators, validateEndpoint, validateUseTLS(logger))
default:
validators = append(validators, validateEndpoint, validateDatabase, validateUseTls(logger))
validators = append(validators, validateEndpoint, validateDatabase, validateUseTLS(logger))
}

validators = append(validators, validateDataSourceOptions)
Expand Down Expand Up @@ -158,7 +157,7 @@ func validateDatabase(dsi *api_common.TDataSourceInstance) error {
return nil
}

func validateUseTls(logger *zap.Logger) dataSourceInstancesValidator {
func validateUseTLS(logger *zap.Logger) dataSourceInstancesValidator {
return func(dsi *api_common.TDataSourceInstance) error {
if dsi.UseTls {
logger.Info("connector will use secure connection to access data source")

Check warning on line 163 in app/server/validate.go

View check run for this annotation

Codecov / codecov/patch

app/server/validate.go#L163

Added line #L163 was not covered by tests
Expand Down

0 comments on commit 468fe2c

Please sign in to comment.