applied renamer
This commit is contained in:
parent
1303461341
commit
4c33724863
@ -8,10 +8,9 @@ import (
|
||||
|
||||
formatter "github.com/antonfisher/nested-logrus-formatter"
|
||||
"github.com/sirupsen/logrus"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/app"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
_ "penahub.gitlab.yandexcloud.net/devops/linters/golang.git/pkg/dummy"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/env"
|
||||
"gitea.pena/PenaSide/discount/internal/app"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/pkg/env"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
13
go.mod
13
go.mod
@ -1,8 +1,8 @@
|
||||
module penahub.gitlab.yandexcloud.net/pena-services/accruals-service
|
||||
module gitea.pena/PenaSide/discount
|
||||
|
||||
go 1.22.0
|
||||
go 1.22
|
||||
|
||||
toolchain go1.22.2
|
||||
toolchain go1.23.2
|
||||
|
||||
require (
|
||||
github.com/antonfisher/nested-logrus-formatter v1.3.1
|
||||
@ -25,20 +25,19 @@ require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/klauspost/compress v1.16.6 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.13.1 // indirect
|
||||
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
|
||||
github.com/xdg-go/scram v1.1.1 // indirect
|
||||
github.com/xdg-go/stringprep v1.0.3 // indirect
|
||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
golang.org/x/crypto v0.10.0 // indirect
|
||||
golang.org/x/net v0.11.0 // indirect
|
||||
golang.org/x/sync v0.3.0 // indirect
|
||||
golang.org/x/sys v0.9.0 // indirect
|
||||
golang.org/x/sys v0.21.0 // indirect
|
||||
golang.org/x/text v0.10.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
|
||||
|
15
go.sum
15
go.sum
@ -5,6 +5,7 @@ github.com/antonfisher/nested-logrus-formatter v1.3.1/go.mod h1:6WTfyWFkBc9+zyBa
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@ -63,8 +64,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
||||
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
||||
github.com/sethvargo/go-envconfig v0.8.3 h1:dXyUrDCJvCm3ybP7yNpiux93qoSORvuH23bdsgFfiJ0=
|
||||
github.com/sethvargo/go-envconfig v0.8.3/go.mod h1:Iz1Gy1Sf3T64TQlJSvee81qDhf7YIlt8GMUX6yyNFs0=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
@ -93,14 +94,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
|
||||
go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8=
|
||||
go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
@ -144,8 +139,8 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
|
||||
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
|
@ -7,11 +7,11 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/initialize"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/server"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/closer"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/mongo"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/initialize"
|
||||
"gitea.pena/PenaSide/discount/internal/server"
|
||||
"gitea.pena/PenaSide/discount/pkg/closer"
|
||||
"gitea.pena/PenaSide/discount/pkg/mongo"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -3,8 +3,8 @@ package controller
|
||||
import (
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/repository"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/service"
|
||||
"gitea.pena/PenaSide/discount/internal/repository"
|
||||
"gitea.pena/PenaSide/discount/internal/service"
|
||||
)
|
||||
|
||||
var GRPCStatuses = map[error]codes.Code{
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/transfer"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/transfer"
|
||||
)
|
||||
|
||||
type DiscountService interface {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package core
|
||||
|
||||
import "penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/mongo"
|
||||
import "gitea.pena/PenaSide/discount/pkg/mongo"
|
||||
|
||||
type Config struct {
|
||||
GRPC GRPCConfiguration
|
||||
|
@ -1,7 +1,7 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
)
|
||||
|
||||
type DiscountOptional struct {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package core
|
||||
|
||||
import "penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
import "gitea.pena/PenaSide/discount/internal/models"
|
||||
|
||||
type UpdateDiscountSettings struct {
|
||||
ID string
|
||||
|
@ -2,7 +2,7 @@ package initialize
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/controller"
|
||||
"gitea.pena/PenaSide/discount/internal/controller"
|
||||
)
|
||||
|
||||
type ControllersDeps struct {
|
||||
|
@ -3,7 +3,7 @@ package initialize
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/repository"
|
||||
"gitea.pena/PenaSide/discount/internal/repository"
|
||||
)
|
||||
|
||||
type RepositoriesDeps struct {
|
||||
|
@ -2,7 +2,7 @@ package initialize
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/service"
|
||||
"gitea.pena/PenaSide/discount/internal/service"
|
||||
)
|
||||
|
||||
type ServicesDeps struct {
|
||||
|
@ -3,7 +3,7 @@ package models
|
||||
import (
|
||||
"time"
|
||||
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
type Discount struct {
|
||||
|
@ -12,12 +12,12 @@ import (
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
"go.mongodb.org/mongo-driver/mongo/readconcern"
|
||||
"go.mongodb.org/mongo-driver/mongo/writeconcern"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/fields"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/expression"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/expression/discount"
|
||||
mongoWrapper "penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/mongo"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/fields"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/expression"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/expression/discount"
|
||||
mongoWrapper "gitea.pena/PenaSide/discount/pkg/mongo"
|
||||
)
|
||||
|
||||
type DiscountRepository struct {
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
// grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
type GRPC struct {
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
type HTTP struct {
|
||||
|
@ -3,11 +3,11 @@ package service
|
||||
import (
|
||||
"context"
|
||||
"github.com/sirupsen/logrus"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/transfer"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/transfer"
|
||||
)
|
||||
|
||||
type DiscountRepository interface {
|
||||
|
@ -3,9 +3,9 @@ package utils
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
func ConstituteConditions(request *discount.ApplyDiscountRequest) (*core.DiscountConditions, error) {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils"
|
||||
)
|
||||
|
||||
func TestConstituteConditions(t *testing.T) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package discount
|
||||
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/convert"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/pkg/convert"
|
||||
)
|
||||
|
||||
/*
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/discount"
|
||||
)
|
||||
|
||||
func TestCalculate(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package discount
|
||||
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
)
|
||||
|
||||
func SortOverhelmingDiscounts(discounts []models.Discount) map[models.TargetScope][]models.DiscountCalculationTarget {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/discount"
|
||||
)
|
||||
|
||||
func TestSortOverhelmingDiscounts(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"golang.org/x/exp/constraints"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
)
|
||||
|
||||
type PeriodFieldPaths struct {
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/fields"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/expression"
|
||||
"gitea.pena/PenaSide/discount/internal/fields"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/expression"
|
||||
)
|
||||
|
||||
func TestGetAscRangeConditionBSON(t *testing.T) {
|
||||
|
@ -2,8 +2,8 @@ package discount
|
||||
|
||||
import (
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/fields"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/fields"
|
||||
)
|
||||
|
||||
func ConstituteCommonConditions(conditions *core.CommonDiscountCondition, cartPurchasesAmount int64) []bson.M {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/expression/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/expression/discount"
|
||||
)
|
||||
|
||||
func TestConstituteCommonConditions(t *testing.T) {
|
||||
|
@ -2,8 +2,8 @@ package discount
|
||||
|
||||
import (
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/fields"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/fields"
|
||||
)
|
||||
|
||||
func ConditionFilter(conditions *core.DiscountConditions, privilegeAmounts, groupPrices map[string]uint64, layer uint64) *bson.M {
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/expression/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/expression/discount"
|
||||
)
|
||||
|
||||
func TestConditionFilter(t *testing.T) {
|
||||
|
@ -3,9 +3,9 @@ package discount
|
||||
import (
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/fields"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/utils"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/fields"
|
||||
"gitea.pena/PenaSide/discount/pkg/utils"
|
||||
)
|
||||
|
||||
func GetDiscountExpression(settings *core.FilterDiscountSettings) *bson.M {
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/fields"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/expression/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/fields"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/expression/discount"
|
||||
)
|
||||
|
||||
func TestGetDiscountExpression(t *testing.T) {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"time"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/fields"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/convert"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/fields"
|
||||
"gitea.pena/PenaSide/discount/pkg/convert"
|
||||
)
|
||||
|
||||
type UpdateDiscountExpression struct {
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/fields"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/expression/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/fields"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/expression/discount"
|
||||
)
|
||||
|
||||
func TestGetUpdateDiscountExpression(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
)
|
||||
|
||||
func FilterCouponDiscounts(discounts []models.Discount) ([]models.Discount, *models.Discount) {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/utils"
|
||||
)
|
||||
|
||||
func TestFilterDiscounts(t *testing.T) {
|
||||
|
@ -2,8 +2,8 @@ package transfer
|
||||
|
||||
import (
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
func AuditModelToProto(model *models.Audit) *discount.Audit {
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/transfer"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/transfer"
|
||||
)
|
||||
|
||||
func TestAuditModelToProto(t *testing.T) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package transfer
|
||||
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
proto "penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/defaults"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
proto "gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/pkg/defaults"
|
||||
)
|
||||
|
||||
func DiscountCalculationTargetProtoToModel(discountTarget *proto.DiscountCalculationTarget) *models.DiscountCalculationTarget {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/transfer"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/transfer"
|
||||
)
|
||||
|
||||
func TestDiscountCalculationTargetProtoToModel(t *testing.T) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package transfer
|
||||
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
proto "penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
proto "gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
func DiscountConditionModelToProto(discountCondition *models.DiscountCondition) *proto.DiscountCondition {
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/transfer"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/transfer"
|
||||
)
|
||||
|
||||
func TestDiscountConditionProtoToModel(t *testing.T) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package transfer
|
||||
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
proto "penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
proto "gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
func DiscountsProtoToModel(discounts *proto.Discounts) []*models.Discount {
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/transfer"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/transfer"
|
||||
)
|
||||
|
||||
func TestDiscountsProtoToModel(t *testing.T) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package transfer
|
||||
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
func OptionalDiscountProtoToCore(discount *discount.DiscountOptional) *core.DiscountOptional {
|
||||
|
@ -4,10 +4,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/transfer"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/transfer"
|
||||
)
|
||||
|
||||
func TestOptionalDiscountProtoToCore(t *testing.T) {
|
||||
|
@ -2,8 +2,8 @@ package transfer
|
||||
|
||||
import (
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
proto "penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
proto "gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
func PeriodModelToProto(perion *models.PeriodCondition) *proto.PeriodCondition {
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/transfer"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/transfer"
|
||||
)
|
||||
|
||||
/*
|
||||
|
@ -1,9 +1,9 @@
|
||||
package transfer
|
||||
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
proto "penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
proto "gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
func ProductTargetsProtoToModel(products []*proto.ProductTarget) []models.ProductTarget {
|
||||
|
@ -4,10 +4,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/utils/transfer"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/models"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/utils/transfer"
|
||||
)
|
||||
|
||||
/*
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/array"
|
||||
"gitea.pena/PenaSide/discount/pkg/array"
|
||||
)
|
||||
|
||||
func TestContains(t *testing.T) {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/array"
|
||||
"gitea.pena/PenaSide/discount/pkg/array"
|
||||
)
|
||||
|
||||
func TestFilter(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/array"
|
||||
"gitea.pena/PenaSide/discount/pkg/array"
|
||||
)
|
||||
|
||||
func TestFind(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/convert"
|
||||
"gitea.pena/PenaSide/discount/pkg/convert"
|
||||
)
|
||||
|
||||
func TestArrayToMap(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/convert"
|
||||
"gitea.pena/PenaSide/discount/pkg/convert"
|
||||
)
|
||||
|
||||
func TestFloatToUint64(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/defaults"
|
||||
"gitea.pena/PenaSide/discount/pkg/defaults"
|
||||
)
|
||||
|
||||
func TestGetDefaultValue(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/utils"
|
||||
"gitea.pena/PenaSide/discount/pkg/utils"
|
||||
)
|
||||
|
||||
func TestGetFilledFieldsCount(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/utils"
|
||||
"gitea.pena/PenaSide/discount/pkg/utils"
|
||||
)
|
||||
|
||||
func TestMergeMaps(t *testing.T) {
|
||||
|
@ -16,9 +16,9 @@ import (
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
"log"
|
||||
"path"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/repository"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/service"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/repository"
|
||||
"gitea.pena/PenaSide/discount/internal/service"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
@ -9,9 +9,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/env"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/pkg/env"
|
||||
)
|
||||
|
||||
func TestCreateDiscount(t *testing.T) {
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/env"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/pkg/env"
|
||||
)
|
||||
|
||||
func TestDeleteDiscount(t *testing.T) {
|
||||
|
@ -8,11 +8,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/env"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/tests/integration/data"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/tests/integration/utils"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/pkg/env"
|
||||
"gitea.pena/PenaSide/discount/tests/integration/data"
|
||||
"gitea.pena/PenaSide/discount/tests/integration/utils"
|
||||
)
|
||||
|
||||
/*
|
||||
|
@ -2,7 +2,7 @@ package data
|
||||
|
||||
import (
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -9,11 +9,11 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/env"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/tests/integration/data"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/tests/integration/utils"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/pkg/env"
|
||||
"gitea.pena/PenaSide/discount/tests/integration/data"
|
||||
"gitea.pena/PenaSide/discount/tests/integration/utils"
|
||||
)
|
||||
|
||||
func TestGetAllDiscounts(t *testing.T) {
|
||||
|
@ -8,10 +8,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/env"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/tests/integration/data"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/pkg/env"
|
||||
"gitea.pena/PenaSide/discount/tests/integration/data"
|
||||
)
|
||||
|
||||
func TestGetDiscountByID(t *testing.T) {
|
||||
|
@ -8,11 +8,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/core"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/pkg/env"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/tests/integration/data"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/accruals-service/tests/integration/utils"
|
||||
"gitea.pena/PenaSide/discount/internal/core"
|
||||
"gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
"gitea.pena/PenaSide/discount/pkg/env"
|
||||
"gitea.pena/PenaSide/discount/tests/integration/data"
|
||||
"gitea.pena/PenaSide/discount/tests/integration/utils"
|
||||
)
|
||||
|
||||
func TestGetUserDiscounts(t *testing.T) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package utils
|
||||
|
||||
import "penahub.gitlab.yandexcloud.net/pena-services/accruals-service/internal/proto/discount"
|
||||
import "gitea.pena/PenaSide/discount/internal/proto/discount"
|
||||
|
||||
func CleanDiscountsIDs(discounts []*discount.Discount) {
|
||||
for _, discount := range discounts {
|
||||
|
Loading…
Reference in New Issue
Block a user