diff --git a/.circleci/config.yml b/.circleci/config.yml index dd779124775..811ac5f53de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ version: 2.1 # References for variables shared across the file references: - circleci-docker: &circleci-docker milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d + circleci-docker: &circleci-docker milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed # the playwright image to use playwright: &playwright cimg/node:18.13.0-browsers @@ -280,13 +280,13 @@ commands: - create_dot_go_version - restore_cache: keys: - - go-mod-sources-v7-{{ checksum "go.sum" }}-{{ checksum ".go-version" }} + - go-mod-sources-v8-{{ checksum "go.sum" }}-{{ checksum ".go-version" }} save_cache_for_go: steps: - create_dot_go_version - save_cache: - key: go-mod-sources-v7-{{ checksum "go.sum" }}-{{ checksum ".go-version" }} + key: go-mod-sources-v8-{{ checksum "go.sum" }}-{{ checksum ".go-version" }} paths: - '~/go' - '~/transcom/mymove/bin/swagger' diff --git a/.github/workflows/go-auto-approve.yml b/.github/workflows/go-auto-approve.yml index 93acc9e8ce8..2b1d02956df 100644 --- a/.github/workflows/go-auto-approve.yml +++ b/.github/workflows/go-auto-approve.yml @@ -27,7 +27,7 @@ jobs: - name: setup go uses: actions/setup-go@v5 with: - go-version: '1.22.2' + go-version: '1.23.1' - name: Tidy run: | go version diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d96bb7b1d1..9df9ef29fe7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -62,7 +62,7 @@ repos: )$ - repo: https://github.com/golangci/golangci-lint - rev: v1.57.2 + rev: v1.61.0 hooks: - id: golangci-lint entry: bash -c 'exec golangci-lint run ${GOLANGCI_LINT_VERBOSE} -j=${GOLANGCI_LINT_CONCURRENCY:-1}' # custom bash so we can override concurrency for faster dev runs diff --git a/.tool-versions b/.tool-versions index 5c20a8cd8f0..1edd18fbde7 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -golang 1.22.2 -nodejs 18.20.2 +golang 1.23.1 +nodejs 18.20.4 diff --git a/Dockerfile.local b/Dockerfile.local index a812b43b135..e9639454443 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -2,7 +2,7 @@ # BUILDER # ########### -FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder +FROM milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed as builder ENV CIRCLECI=true diff --git a/Dockerfile.migrations_local b/Dockerfile.migrations_local index 07f14c00a21..3b9ea3c75a5 100644 --- a/Dockerfile.migrations_local +++ b/Dockerfile.migrations_local @@ -2,7 +2,7 @@ # BUILDER # ########### -FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder +FROM milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed as builder ENV CIRCLECI=true diff --git a/Dockerfile.reviewapp b/Dockerfile.reviewapp index cd7abdac212..94620459b8a 100644 --- a/Dockerfile.reviewapp +++ b/Dockerfile.reviewapp @@ -3,7 +3,7 @@ ########### # Base builder so the ci build image hash is referenced once -FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder +FROM milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed as builder ENV CIRCLECI=docker ENV REACT_APP_NODE_ENV=development diff --git a/Dockerfile.tasks_local b/Dockerfile.tasks_local index 61c5e043942..6735d2690e0 100644 --- a/Dockerfile.tasks_local +++ b/Dockerfile.tasks_local @@ -2,7 +2,7 @@ # BUILDER # ########### -FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder +FROM milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed as builder ENV CIRCLECI=true diff --git a/Dockerfile.tools_local b/Dockerfile.tools_local index a68970c839d..57edc1744da 100644 --- a/Dockerfile.tools_local +++ b/Dockerfile.tools_local @@ -2,7 +2,7 @@ # BUILDER # ########### -FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder +FROM milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed as builder ENV CIRCLECI=true diff --git a/Dockerfile.webhook_client b/Dockerfile.webhook_client index 6066bd00172..c31e6a561e6 100644 --- a/Dockerfile.webhook_client +++ b/Dockerfile.webhook_client @@ -2,7 +2,7 @@ # BUILDER # ########### -FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder +FROM milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed as builder # Prepare public DOD certificates. # hadolint ignore=DL3002 diff --git a/Dockerfile.webhook_client_dp3 b/Dockerfile.webhook_client_dp3 index dc3569c2e4c..8a622d6d6e6 100644 --- a/Dockerfile.webhook_client_dp3 +++ b/Dockerfile.webhook_client_dp3 @@ -2,7 +2,7 @@ # BUILDER # ########### -FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder +FROM milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed as builder # Prepare public DOD certificates. # hadolint ignore=DL3002 diff --git a/Dockerfile.webhook_client_local b/Dockerfile.webhook_client_local index c87c03c5504..c1e3cf6c4af 100644 --- a/Dockerfile.webhook_client_local +++ b/Dockerfile.webhook_client_local @@ -2,7 +2,7 @@ # BUILDER # ########### -FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder +FROM milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed as builder # Prepare public DOD certificates. # hadolint ignore=DL3002 diff --git a/Makefile b/Makefile index 85299e2434c..9f86ef2ce78 100644 --- a/Makefile +++ b/Makefile @@ -414,7 +414,7 @@ build_tools: bin/gin \ build: server_build build_tools client_build ## Build the server, tools, and client .PHONY: mocks_generate -mocks_generate: bin/mockery ## Generate mockery mocks for tests +mocks_generate: bin/mockery ## Generate mockery mocks for tests. go generate $$(go list ./... | grep -v \\/pkg\\/gen\\/ | grep -v \\/cmd\\/) .PHONY: server_test_setup @@ -1057,7 +1057,7 @@ pretty: gofmt ## Run code through JS and Golang formatters .PHONY: docker_circleci docker_circleci: ## Run CircleCI container locally with project mounted - docker run -it --pull=always --rm=true -v $(PWD):$(PWD) -w $(PWD) -e CIRCLECI=1 milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d bash + docker run -it --pull=always --rm=true -v $(PWD):$(PWD) -w $(PWD) -e CIRCLECI=1 milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed bash .PHONY: docker_local_ssh_server_with_password docker_local_ssh_server_with_password: diff --git a/cmd/ghc-pricing-parser/main.go b/cmd/ghc-pricing-parser/main.go index 3f37b6ec937..a3a0d0b348f 100644 --- a/cmd/ghc-pricing-parser/main.go +++ b/cmd/ghc-pricing-parser/main.go @@ -324,7 +324,7 @@ func summarizeModel(appCtx appcontext.AppContext, header string, modelInstance i if err != nil { return err } - pterm.Printf(pterm.Gray("(representative rows above; " + pterm.Green(length) + " rows total)\n\n")) + pterm.Printf(pterm.Gray("(representative rows above; %s rows total)\n\n"), pterm.Green(length)) return nil } diff --git a/go.mod b/go.mod index c2e5591e886..f1cdbf632dd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,10 @@ module github.com/transcom/mymove -go 1.22 +go 1.23 + +// Temporary workaroudn to mockery alias generation issue with go 1.23 +// found at https://github.com/vektra/mockery/issues/803 +godebug gotypesalias=0 require ( github.com/DATA-DOG/go-txdb v0.1.7 @@ -71,7 +75,7 @@ require ( github.com/tcnksm/go-input v0.0.0-20180404061846-548a7d7a8ee8 github.com/tealeg/xlsx/v3 v3.3.7 github.com/tiaguinho/gosoap v1.4.4 - github.com/vektra/mockery/v2 v2.33.2 + github.com/vektra/mockery/v2 v2.45.1 github.com/xuri/excelize/v2 v2.8.1 go.flipt.io/flipt/rpc/flipt v1.45.0 go.flipt.io/flipt/sdk/go v0.5.0 @@ -148,7 +152,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.7 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/brunoscheufler/aws-ecs-metadata-go v0.0.0-20221221133751-67e37ae746cd // indirect - github.com/chigopher/pathlib v1.0.0 // indirect + github.com/chigopher/pathlib v0.19.1 // indirect github.com/codegangsta/envy v0.0.0-20141216192214-4b78388c8ce4 // indirect github.com/containerd/console v1.0.3 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect @@ -192,7 +196,7 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hhrutter/lzw v1.0.0 // indirect github.com/hhrutter/tiff v1.0.1 // indirect - github.com/huandu/xstrings v1.3.3 // indirect + github.com/huandu/xstrings v1.4.0 // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect diff --git a/go.sum b/go.sum index 93e7ee0989e..9aa9e739dae 100644 --- a/go.sum +++ b/go.sum @@ -104,8 +104,8 @@ github.com/brunoscheufler/aws-ecs-metadata-go v0.0.0-20221221133751-67e37ae746cd github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chigopher/pathlib v1.0.0 h1:SbsCrFX4vDf4M2d8mT/RTzuVlKOjTKoPHK0HidsQFak= -github.com/chigopher/pathlib v1.0.0/go.mod h1:3+YPPV21mU9vyw8Mjp+F33CyCfE6iOzinpiqBcccv7I= +github.com/chigopher/pathlib v0.19.1 h1:RoLlUJc0CqBGwq239cilyhxPNLXTK+HXoASGyGznx5A= +github.com/chigopher/pathlib v0.19.1/go.mod h1:tzC1dZLW8o33UQpWkNkhvPwL5n4yyFRFm/jL1YGWFvY= 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/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= @@ -313,8 +313,9 @@ github.com/hhrutter/lzw v1.0.0 h1:laL89Llp86W3rRs83LvKbwYRx6INE8gDn0XNb1oXtm0= github.com/hhrutter/lzw v1.0.0/go.mod h1:2HC6DJSn/n6iAZfgM3Pg+cP1KxeWc3ezG8bBqW5+WEo= github.com/hhrutter/tiff v1.0.1 h1:MIus8caHU5U6823gx7C6jrfoEvfSTGtEFRiM8/LOzC0= github.com/hhrutter/tiff v1.0.1/go.mod h1:zU/dNgDm0cMIa8y8YwcYBeuEEveI4B0owqHyiPpJPHc= -github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -632,8 +633,8 @@ github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9r github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM= github.com/urfave/cli v1.22.10 h1:p8Fspmz3iTctJstry1PYS3HVdllxnEzTEsgIgtxTrCk= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vektra/mockery/v2 v2.33.2 h1:znIUwQ3FxnA5jvPy8irYBoiIqMZhuOJhoPOJYNoTJqU= -github.com/vektra/mockery/v2 v2.33.2/go.mod h1:9lREs4VEeQiUS3rizYQx1saxHu2JiIhThP0q9+fDegM= +github.com/vektra/mockery/v2 v2.45.1 h1:6HpdnKiLCjVtzlRLQPUNIM0u7yrvAoZ7VWF1TltJvTM= +github.com/vektra/mockery/v2 v2.45.1/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= diff --git a/nix/default.nix b/nix/default.nix index eaf35017dc0..957cfa1ca4d 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -33,12 +33,12 @@ buildEnv { (import (builtins.fetchGit { # Descriptive name to make the store path easier to identify - name = "go-1.22.2"; + name = "go-1.23.1"; url = "https://github.com/NixOS/nixpkgs/"; ref = "refs/heads/nixpkgs-unstable"; rev = "dfcffbd74fd6f0419370d8240e445252a39f4d10"; }) - { }).go_1_22_2 + { }).go_1_23_1 (import (builtins.fetchGit { diff --git a/pkg/apperror/errors.go b/pkg/apperror/errors.go index 247d9f322df..d8a85fbd3f2 100644 --- a/pkg/apperror/errors.go +++ b/pkg/apperror/errors.go @@ -222,7 +222,7 @@ func NewInvalidInputError(id uuid.UUID, err error, validationErrors *validate.Er func (e InvalidInputError) Error() string { if e.message != "" { - return fmt.Sprintf(e.message) + return e.message } else if e.id == uuid.Nil && e.ValidationErrors != nil { return fmt.Sprintf("Invalid input received. %s", e.ValidationErrors) } else if e.ValidationErrors != nil { @@ -244,7 +244,7 @@ type QueryError struct { func (e QueryError) Error() string { if e.message != "" { - return fmt.Sprintf(e.message) + return e.message } return fmt.Sprintf("Could not complete query related to object of type: %s.", e.objectType) } @@ -281,7 +281,7 @@ func NewInvalidCreateInputError(validationErrors *validate.Errors, message strin func (e InvalidCreateInputError) Error() string { if e.message != "" { - return fmt.Sprintf(e.message) + return e.message } return fmt.Sprintf("Invalid input for ID: %s", e.ValidationErrors) } diff --git a/pkg/handlers/errors.go b/pkg/handlers/errors.go index f3c3e7fa9a7..993fd9e0428 100644 --- a/pkg/handlers/errors.go +++ b/pkg/handlers/errors.go @@ -286,7 +286,7 @@ func ServeCustomError(rw http.ResponseWriter, r *http.Request, err error) { default: rw.WriteHeader(http.StatusInternalServerError) if r == nil || r.Method != http.MethodHead { - _, _ = rw.Write(errorAsJSON(openapierrors.New(http.StatusInternalServerError, err.Error()), traceID)) + _, _ = rw.Write(errorAsJSON(openapierrors.New(http.StatusInternalServerError, "%s", err.Error()), traceID)) } } } diff --git a/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go b/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go index 8012bd0103d..1f8c0b26e22 100644 --- a/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go @@ -599,7 +599,7 @@ func Order(order *models.Order) *ghcmessages.Order { var moveCode string var moveTaskOrderID strfmt.UUID - if order.Moves != nil && len(order.Moves) > 0 { + if len(order.Moves) > 0 { moveCode = order.Moves[0].Locator moveTaskOrderID = strfmt.UUID(order.Moves[0].ID.String()) } @@ -1428,7 +1428,7 @@ func MTOShipment(storer storage.FileStorer, mtoShipment *models.MTOShipment, sit payload.SitDaysAllowance = handlers.FmtIntPtrToInt64(&totalSITAllowance) } - if mtoShipment.SITDurationUpdates != nil && len(mtoShipment.SITDurationUpdates) > 0 { + if len(mtoShipment.SITDurationUpdates) > 0 { payload.SitExtensions = *SITDurationUpdates(&mtoShipment.SITDurationUpdates) } @@ -1550,7 +1550,7 @@ func PaymentRequests(appCtx appcontext.AppContext, prs *models.PaymentRequests, func PaymentRequest(appCtx appcontext.AppContext, pr *models.PaymentRequest, storer storage.FileStorer) (*ghcmessages.PaymentRequest, error) { serviceDocs := make(ghcmessages.ProofOfServiceDocs, len(pr.ProofOfServiceDocs)) - if pr.ProofOfServiceDocs != nil && len(pr.ProofOfServiceDocs) > 0 { + if len(pr.ProofOfServiceDocs) > 0 { for i, proofOfService := range pr.ProofOfServiceDocs { payload, err := ProofOfServiceDoc(proofOfService, storer) if err != nil { @@ -1695,7 +1695,7 @@ func ServiceRequestDoc(serviceRequest models.ServiceRequestDocument, storer stor uploads := make([]*ghcmessages.Upload, len(serviceRequest.ServiceRequestDocumentUploads)) - if serviceRequest.ServiceRequestDocumentUploads != nil && len(serviceRequest.ServiceRequestDocumentUploads) > 0 { + if len(serviceRequest.ServiceRequestDocumentUploads) > 0 { for i, serviceRequestUpload := range serviceRequest.ServiceRequestDocumentUploads { url, err := storer.PresignedURL(serviceRequestUpload.Upload.StorageKey, serviceRequestUpload.Upload.ContentType) if err != nil { @@ -1743,7 +1743,7 @@ func MTOServiceItemModel(s *models.MTOServiceItem, storer storage.FileStorer) *g serviceRequestDocs := make(ghcmessages.ServiceRequestDocuments, len(s.ServiceRequestDocuments)) - if s.ServiceRequestDocuments != nil && len(s.ServiceRequestDocuments) > 0 { + if len(s.ServiceRequestDocuments) > 0 { for i, serviceRequest := range s.ServiceRequestDocuments { payload, err := ServiceRequestDoc(serviceRequest, storer) if err != nil { @@ -1932,7 +1932,7 @@ func WeightTicketUpload(storer storage.FileStorer, upload models.Upload, url str func ProofOfServiceDoc(proofOfService models.ProofOfServiceDoc, storer storage.FileStorer) (*ghcmessages.ProofOfServiceDoc, error) { uploads := make([]*ghcmessages.Upload, len(proofOfService.PrimeUploads)) - if proofOfService.PrimeUploads != nil && len(proofOfService.PrimeUploads) > 0 { + if len(proofOfService.PrimeUploads) > 0 { for i, primeUpload := range proofOfService.PrimeUploads { url, err := storer.PresignedURL(primeUpload.Upload.StorageKey, primeUpload.Upload.ContentType) if err != nil { diff --git a/pkg/handlers/primeapi/payloads/model_to_payload.go b/pkg/handlers/primeapi/payloads/model_to_payload.go index 85ca0157ad5..b88d8c7ca9c 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload.go @@ -314,7 +314,7 @@ func MTOAgents(mtoAgents *models.MTOAgents) *primemessages.MTOAgents { func ProofOfServiceDoc(proofOfServiceDoc models.ProofOfServiceDoc) *primemessages.ProofOfServiceDoc { uploads := make([]*primemessages.UploadWithOmissions, len(proofOfServiceDoc.PrimeUploads)) - if proofOfServiceDoc.PrimeUploads != nil && len(proofOfServiceDoc.PrimeUploads) > 0 { + if len(proofOfServiceDoc.PrimeUploads) > 0 { for i, primeUpload := range proofOfServiceDoc.PrimeUploads { uploads[i] = basicUpload(&primeUpload.Upload) //#nosec G601 } @@ -333,7 +333,7 @@ func PaymentRequest(paymentRequest *models.PaymentRequest) *primemessages.Paymen serviceDocs := make(primemessages.ProofOfServiceDocs, len(paymentRequest.ProofOfServiceDocs)) - if paymentRequest.ProofOfServiceDocs != nil && len(paymentRequest.ProofOfServiceDocs) > 0 { + if len(paymentRequest.ProofOfServiceDocs) > 0 { for i, proofOfService := range paymentRequest.ProofOfServiceDocs { serviceDocs[i] = ProofOfServiceDoc(proofOfService) } @@ -445,7 +445,7 @@ func PaymentServiceItemParams(paymentServiceItemParams *models.PaymentServiceIte //nolint:gosec //G601 func ServiceRequestDocument(serviceRequestDocument models.ServiceRequestDocument) *primemessages.ServiceRequestDocument { uploads := make([]*primemessages.UploadWithOmissions, len(serviceRequestDocument.ServiceRequestDocumentUploads)) - if serviceRequestDocument.ServiceRequestDocumentUploads != nil && len(serviceRequestDocument.ServiceRequestDocumentUploads) > 0 { + if len(serviceRequestDocument.ServiceRequestDocumentUploads) > 0 { for i, proofOfServiceDocumentUpload := range serviceRequestDocument.ServiceRequestDocumentUploads { uploads[i] = basicUpload(&proofOfServiceDocumentUpload.Upload) } @@ -705,7 +705,7 @@ func MTOServiceItem(mtoServiceItem *models.MTOServiceItem) primemessages.MTOServ serviceRequestDocuments := make(primemessages.ServiceRequestDocuments, len(mtoServiceItem.ServiceRequestDocuments)) - if mtoServiceItem.ServiceRequestDocuments != nil && len(mtoServiceItem.ServiceRequestDocuments) > 0 { + if len(mtoServiceItem.ServiceRequestDocuments) > 0 { for i, serviceRequestDocument := range mtoServiceItem.ServiceRequestDocuments { serviceRequestDocuments[i] = ServiceRequestDocument(serviceRequestDocument) } diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload.go b/pkg/handlers/primeapiv2/payloads/model_to_payload.go index 3a26daaf5bc..390687bb545 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload.go @@ -259,7 +259,7 @@ func MTOAgents(mtoAgents *models.MTOAgents) *primev2messages.MTOAgents { func ProofOfServiceDoc(proofOfServiceDoc models.ProofOfServiceDoc) *primev2messages.ProofOfServiceDoc { uploads := make([]*primev2messages.UploadWithOmissions, len(proofOfServiceDoc.PrimeUploads)) - if proofOfServiceDoc.PrimeUploads != nil && len(proofOfServiceDoc.PrimeUploads) > 0 { + if len(proofOfServiceDoc.PrimeUploads) > 0 { for i, primeUpload := range proofOfServiceDoc.PrimeUploads { //#nosec G601 new in 1.22.2 uploads[i] = basicUpload(&primeUpload.Upload) } @@ -278,7 +278,7 @@ func PaymentRequest(paymentRequest *models.PaymentRequest) *primev2messages.Paym serviceDocs := make(primev2messages.ProofOfServiceDocs, len(paymentRequest.ProofOfServiceDocs)) - if paymentRequest.ProofOfServiceDocs != nil && len(paymentRequest.ProofOfServiceDocs) > 0 { + if len(paymentRequest.ProofOfServiceDocs) > 0 { for i, proofOfService := range paymentRequest.ProofOfServiceDocs { serviceDocs[i] = ProofOfServiceDoc(proofOfService) } @@ -389,7 +389,7 @@ func PaymentServiceItemParams(paymentServiceItemParams *models.PaymentServiceIte func ServiceRequestDocument(serviceRequestDocument models.ServiceRequestDocument) *primev2messages.ServiceRequestDocument { uploads := make([]*primev2messages.UploadWithOmissions, len(serviceRequestDocument.ServiceRequestDocumentUploads)) - if serviceRequestDocument.ServiceRequestDocumentUploads != nil && len(serviceRequestDocument.ServiceRequestDocumentUploads) > 0 { + if len(serviceRequestDocument.ServiceRequestDocumentUploads) > 0 { for i, proofOfServiceDocumentUpload := range serviceRequestDocument.ServiceRequestDocumentUploads { //#nosec G601 new in 1.22.2 uploads[i] = basicUpload(&proofOfServiceDocumentUpload.Upload) } @@ -633,7 +633,7 @@ func MTOServiceItem(mtoServiceItem *models.MTOServiceItem) primev2messages.MTOSe serviceRequestDocuments := make(primev2messages.ServiceRequestDocuments, len(mtoServiceItem.ServiceRequestDocuments)) - if mtoServiceItem.ServiceRequestDocuments != nil && len(mtoServiceItem.ServiceRequestDocuments) > 0 { + if len(mtoServiceItem.ServiceRequestDocuments) > 0 { for i, serviceRequestDocument := range mtoServiceItem.ServiceRequestDocuments { serviceRequestDocuments[i] = ServiceRequestDocument(serviceRequestDocument) } diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload.go b/pkg/handlers/primeapiv3/payloads/model_to_payload.go index 6b096420d71..29146c8f8fe 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload.go @@ -259,7 +259,7 @@ func MTOAgents(mtoAgents *models.MTOAgents) *primev3messages.MTOAgents { func ProofOfServiceDoc(proofOfServiceDoc models.ProofOfServiceDoc) *primev3messages.ProofOfServiceDoc { uploads := make([]*primev3messages.UploadWithOmissions, len(proofOfServiceDoc.PrimeUploads)) - if proofOfServiceDoc.PrimeUploads != nil && len(proofOfServiceDoc.PrimeUploads) > 0 { + if len(proofOfServiceDoc.PrimeUploads) > 0 { for i, primeUpload := range proofOfServiceDoc.PrimeUploads { //#nosec G601 uploads[i] = basicUpload(&primeUpload.Upload) //#nosec G601 } @@ -278,7 +278,7 @@ func PaymentRequest(paymentRequest *models.PaymentRequest) *primev3messages.Paym serviceDocs := make(primev3messages.ProofOfServiceDocs, len(paymentRequest.ProofOfServiceDocs)) - if paymentRequest.ProofOfServiceDocs != nil && len(paymentRequest.ProofOfServiceDocs) > 0 { + if len(paymentRequest.ProofOfServiceDocs) > 0 { for i, proofOfService := range paymentRequest.ProofOfServiceDocs { serviceDocs[i] = ProofOfServiceDoc(proofOfService) } @@ -389,7 +389,7 @@ func PaymentServiceItemParams(paymentServiceItemParams *models.PaymentServiceIte func ServiceRequestDocument(serviceRequestDocument models.ServiceRequestDocument) *primev3messages.ServiceRequestDocument { uploads := make([]*primev3messages.UploadWithOmissions, len(serviceRequestDocument.ServiceRequestDocumentUploads)) - if serviceRequestDocument.ServiceRequestDocumentUploads != nil && len(serviceRequestDocument.ServiceRequestDocumentUploads) > 0 { + if len(serviceRequestDocument.ServiceRequestDocumentUploads) > 0 { for i, proofOfServiceDocumentUpload := range serviceRequestDocument.ServiceRequestDocumentUploads { uploads[i] = basicUpload(&proofOfServiceDocumentUpload.Upload) //#nosec G601 } @@ -724,7 +724,7 @@ func MTOServiceItem(mtoServiceItem *models.MTOServiceItem) primev3messages.MTOSe serviceRequestDocuments := make(primev3messages.ServiceRequestDocuments, len(mtoServiceItem.ServiceRequestDocuments)) - if mtoServiceItem.ServiceRequestDocuments != nil && len(mtoServiceItem.ServiceRequestDocuments) > 0 { + if len(mtoServiceItem.ServiceRequestDocuments) > 0 { for i, serviceRequestDocument := range mtoServiceItem.ServiceRequestDocuments { serviceRequestDocuments[i] = ServiceRequestDocument(serviceRequestDocument) } diff --git a/pkg/handlers/routing/base_routing_suite.go b/pkg/handlers/routing/base_routing_suite.go index 092a304a174..b217d6ec1af 100644 --- a/pkg/handlers/routing/base_routing_suite.go +++ b/pkg/handlers/routing/base_routing_suite.go @@ -323,7 +323,7 @@ func (suite *BaseRoutingSuite) NewTLSAuthenticatedPrimeRequest(method string, re func (suite *BaseRoutingSuite) CreateFileWithContent(fpath string, fcontent string) { routingConfig := suite.RoutingConfig() dir := filepath.Dir(fpath) - suite.NoError(routingConfig.FileSystem.MkdirAll(dir, 0777)) + suite.NoError(routingConfig.FileSystem.MkdirAll(dir, 0600)) f, err := routingConfig.FileSystem.Create(fpath) suite.NoError(err) _, err = f.WriteString(fcontent) diff --git a/pkg/models/move.go b/pkg/models/move.go index 115ea398164..249776cff40 100644 --- a/pkg/models/move.go +++ b/pkg/models/move.go @@ -537,12 +537,12 @@ func FetchMovesByOrderID(db *pop.Connection, orderID uuid.UUID) (Moves, error) { moves[0].MTOShipments[0].PPMShipment.WeightTickets = filteredWeightTickets } // We do not need to consider deleted moving expenses - if moves[0].MTOShipments[0].PPMShipment.MovingExpenses != nil && len(moves[0].MTOShipments[0].PPMShipment.MovingExpenses) > 0 { + if len(moves[0].MTOShipments[0].PPMShipment.MovingExpenses) > 0 { nonDeletedMovingExpenses := moves[0].MTOShipments[0].PPMShipment.MovingExpenses.FilterDeleted() moves[0].MTOShipments[0].PPMShipment.MovingExpenses = nonDeletedMovingExpenses } // We do not need to consider deleted progear weight tickets - if moves[0].MTOShipments[0].PPMShipment.ProgearWeightTickets != nil && len(moves[0].MTOShipments[0].PPMShipment.ProgearWeightTickets) > 0 { + if len(moves[0].MTOShipments[0].PPMShipment.ProgearWeightTickets) > 0 { nonDeletedProgearTickets := moves[0].MTOShipments[0].PPMShipment.ProgearWeightTickets.FilterDeleted() moves[0].MTOShipments[0].PPMShipment.ProgearWeightTickets = nonDeletedProgearTickets } diff --git a/pkg/models/validators_test.go b/pkg/models/validators_test.go index bd1d5e8d6e6..60d3da2cfcb 100644 --- a/pkg/models/validators_test.go +++ b/pkg/models/validators_test.go @@ -627,6 +627,7 @@ func Test_MustBeBothNilOrBothNotNil_IsValid(t *testing.T) { func Test_ItemCanFitInsideCrate_IsValid(t *testing.T) { makeInt32 := func(i int) *int32 { + // #nosec G115: it is unrealistic that an imperial measurement will exceed int32 limits val := int32(i) return &val } @@ -709,6 +710,7 @@ func Test_ItemCanFitInsideCrate_IsValid(t *testing.T) { func Test_ItemCanFitInsideCrate_IsValid_V2(t *testing.T) { makeInt32 := func(i int) *int32 { + // #nosec G115: it is unrealistic that an imperial measurement will exceed int32 limits val := int32(i) return &val } diff --git a/pkg/notifications/mocks/NotificationSender.go b/pkg/notifications/mocks/NotificationSender.go index 8ae1e766ae8..47de69ce520 100644 --- a/pkg/notifications/mocks/NotificationSender.go +++ b/pkg/notifications/mocks/NotificationSender.go @@ -18,6 +18,10 @@ type NotificationSender struct { func (_m *NotificationSender) SendNotification(appCtx appcontext.AppContext, notification notifications.Notification) error { ret := _m.Called(appCtx, notification) + if len(ret) == 0 { + panic("no return value specified for SendNotification") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, notifications.Notification) error); ok { r0 = rf(appCtx, notification) diff --git a/pkg/paperwork/generator_test.go b/pkg/paperwork/generator_test.go index 775c3207696..235f1b4305c 100644 --- a/pkg/paperwork/generator_test.go +++ b/pkg/paperwork/generator_test.go @@ -112,7 +112,7 @@ func (suite *PaperworkSuite) TestPDFFromImages() { suite.FatalNil(err) f, err := os.CreateTemp(tmpDir, "") suite.FatalNil(err) - err = os.WriteFile(f.Name(), file, os.ModePerm) + err = os.WriteFile(f.Name(), file, 0600) suite.FatalNil(err) err = api.ExtractImagesFile(f.Name(), tmpDir, []string{"-2"}, generator.pdfConfig) suite.FatalNil(err) @@ -171,7 +171,7 @@ func (suite *PaperworkSuite) TestPDFFromImagesNoRotation() { suite.FatalNil(err) f, err := os.CreateTemp(tmpDir, "") suite.FatalNil(err) - err = os.WriteFile(f.Name(), file, os.ModePerm) + err = os.WriteFile(f.Name(), file, 0600) suite.FatalNil(err) err = api.ExtractImagesFile(f.Name(), tmpDir, []string{"-2"}, generator.pdfConfig) suite.FatalNil(err) diff --git a/pkg/payment_request/mocks/Helper.go b/pkg/payment_request/mocks/Helper.go index b99276aee47..e105f77b66e 100644 --- a/pkg/payment_request/mocks/Helper.go +++ b/pkg/payment_request/mocks/Helper.go @@ -18,6 +18,10 @@ type Helper struct { func (_m *Helper) FetchServiceParamList(appCtx appcontext.AppContext, mtoServiceItem models.MTOServiceItem) (models.ServiceParams, error) { ret := _m.Called(appCtx, mtoServiceItem) + if len(ret) == 0 { + panic("no return value specified for FetchServiceParamList") + } + var r0 models.ServiceParams var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.MTOServiceItem) (models.ServiceParams, error)); ok { @@ -44,6 +48,10 @@ func (_m *Helper) FetchServiceParamList(appCtx appcontext.AppContext, mtoService func (_m *Helper) FetchServiceParamsForServiceItems(appCtx appcontext.AppContext, mtoServiceItems []models.MTOServiceItem) (models.ServiceParams, error) { ret := _m.Called(appCtx, mtoServiceItems) + if len(ret) == 0 { + panic("no return value specified for FetchServiceParamsForServiceItems") + } + var r0 models.ServiceParams var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []models.MTOServiceItem) (models.ServiceParams, error)); ok { diff --git a/pkg/payment_request/service_param_value_lookups/distance_zip_lookup.go b/pkg/payment_request/service_param_value_lookups/distance_zip_lookup.go index 9a903310d41..5c1db3e5776 100644 --- a/pkg/payment_request/service_param_value_lookups/distance_zip_lookup.go +++ b/pkg/payment_request/service_param_value_lookups/distance_zip_lookup.go @@ -52,10 +52,10 @@ func (r DistanceZipLookup) lookup(appCtx appcontext.AppContext, keyData *Service errorMsgForPickupZip := fmt.Sprintf("Shipment must have valid pickup zipcode. Received: %s", pickupZip) errorMsgForDestinationZip := fmt.Sprintf("Shipment must have valid destination zipcode. Received: %s", destinationZip) if len(pickupZip) < 5 { - return "", apperror.NewInvalidInputError(*mtoShipmentID, fmt.Errorf(errorMsgForPickupZip), nil, errorMsgForPickupZip) + return "", apperror.NewInvalidInputError(*mtoShipmentID, fmt.Errorf("%s", errorMsgForPickupZip), nil, errorMsgForPickupZip) } if len(destinationZip) < 5 { - return "", apperror.NewInvalidInputError(*mtoShipmentID, fmt.Errorf(errorMsgForDestinationZip), nil, errorMsgForDestinationZip) + return "", apperror.NewInvalidInputError(*mtoShipmentID, fmt.Errorf("%s", errorMsgForDestinationZip), nil, errorMsgForDestinationZip) } serviceCode := keyData.MTOServiceItem.ReService.Code diff --git a/pkg/payment_request/service_param_value_lookups/service_param_value_lookups.go b/pkg/payment_request/service_param_value_lookups/service_param_value_lookups.go index 56d3fd3298a..9e730f7650a 100644 --- a/pkg/payment_request/service_param_value_lookups/service_param_value_lookups.go +++ b/pkg/payment_request/service_param_value_lookups/service_param_value_lookups.go @@ -442,7 +442,7 @@ func GetDestinationForDistanceLookup(appCtx appcontext.AppContext, mtoShipment m if err != nil { return models.Address{}, apperror.NewNotFoundError(shipmentCopy.ID, "MTOShipment not found in Destination For Distance Lookup") } - if shipmentCopy.MTOServiceItems == nil || len(shipmentCopy.MTOServiceItems) == 0 { + if len(shipmentCopy.MTOServiceItems) == 0 { return *mtoShipment.DestinationAddress, nil } diff --git a/pkg/route/ghcmocks/DTODPlannerMileage.go b/pkg/route/ghcmocks/DTODPlannerMileage.go index 2ae207ac78e..cee1a1bc571 100644 --- a/pkg/route/ghcmocks/DTODPlannerMileage.go +++ b/pkg/route/ghcmocks/DTODPlannerMileage.go @@ -16,6 +16,10 @@ type DTODPlannerMileage struct { func (_m *DTODPlannerMileage) DTODZip5Distance(appCtx appcontext.AppContext, pickup string, destination string) (int, error) { ret := _m.Called(appCtx, pickup, destination) + if len(ret) == 0 { + panic("no return value specified for DTODZip5Distance") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, string) (int, error)); ok { diff --git a/pkg/route/ghcmocks/SoapCaller.go b/pkg/route/ghcmocks/SoapCaller.go index 9abfd6a052b..374549c0d87 100644 --- a/pkg/route/ghcmocks/SoapCaller.go +++ b/pkg/route/ghcmocks/SoapCaller.go @@ -16,6 +16,10 @@ type SoapCaller struct { func (_m *SoapCaller) Call(m string, p gosoap.SoapParams) (*gosoap.Response, error) { ret := _m.Called(m, p) + if len(ret) == 0 { + panic("no return value specified for Call") + } + var r0 *gosoap.Response var r1 error if rf, ok := ret.Get(0).(func(string, gosoap.SoapParams) (*gosoap.Response, error)); ok { diff --git a/pkg/route/mocks/Planner.go b/pkg/route/mocks/Planner.go index 20bce6201e8..2cf26622df2 100644 --- a/pkg/route/mocks/Planner.go +++ b/pkg/route/mocks/Planner.go @@ -20,6 +20,10 @@ type Planner struct { func (_m *Planner) LatLongTransitDistance(appCtx appcontext.AppContext, source route.LatLong, destination route.LatLong) (int, error) { ret := _m.Called(appCtx, source, destination) + if len(ret) == 0 { + panic("no return value specified for LatLongTransitDistance") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, route.LatLong, route.LatLong) (int, error)); ok { @@ -44,6 +48,10 @@ func (_m *Planner) LatLongTransitDistance(appCtx appcontext.AppContext, source r func (_m *Planner) TransitDistance(appCtx appcontext.AppContext, source *models.Address, destination *models.Address) (int, error) { ret := _m.Called(appCtx, source, destination) + if len(ret) == 0 { + panic("no return value specified for TransitDistance") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.Address, *models.Address) (int, error)); ok { @@ -68,6 +76,10 @@ func (_m *Planner) TransitDistance(appCtx appcontext.AppContext, source *models. func (_m *Planner) Zip3TransitDistance(appCtx appcontext.AppContext, source string, destination string) (int, error) { ret := _m.Called(appCtx, source, destination) + if len(ret) == 0 { + panic("no return value specified for Zip3TransitDistance") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, string) (int, error)); ok { @@ -92,6 +104,10 @@ func (_m *Planner) Zip3TransitDistance(appCtx appcontext.AppContext, source stri func (_m *Planner) Zip5TransitDistance(appCtx appcontext.AppContext, source string, destination string) (int, error) { ret := _m.Called(appCtx, source, destination) + if len(ret) == 0 { + panic("no return value specified for Zip5TransitDistance") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, string) (int, error)); ok { @@ -116,6 +132,10 @@ func (_m *Planner) Zip5TransitDistance(appCtx appcontext.AppContext, source stri func (_m *Planner) Zip5TransitDistanceLineHaul(appCtx appcontext.AppContext, source string, destination string) (int, error) { ret := _m.Called(appCtx, source, destination) + if len(ret) == 0 { + panic("no return value specified for Zip5TransitDistanceLineHaul") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, string) (int, error)); ok { @@ -140,6 +160,10 @@ func (_m *Planner) Zip5TransitDistanceLineHaul(appCtx appcontext.AppContext, sou func (_m *Planner) ZipTransitDistance(appCtx appcontext.AppContext, source string, destination string) (int, error) { ret := _m.Called(appCtx, source, destination) + if len(ret) == 0 { + panic("no return value specified for ZipTransitDistance") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, string) (int, error)); ok { diff --git a/pkg/services/invoice/invoice_upload_updater.go b/pkg/services/invoice/invoice_upload_updater.go index c0533fdd46a..95e2250d893 100644 --- a/pkg/services/invoice/invoice_upload_updater.go +++ b/pkg/services/invoice/invoice_upload_updater.go @@ -32,7 +32,7 @@ func (u UploadUpdater) saveInvoice(appCtx appcontext.AppContext, invoice *models if verrs.HasAny() { dbError = dbError + verrs.Error() } - return errors.Wrapf(errors.New(dbError), "error saving invoice with ID: "+invoice.ID.String()) + return errors.Wrapf(errors.New(dbError), "error saving invoice with ID: %s", invoice.ID.String()) } return nil } diff --git a/pkg/services/mocks/AOAPacketCreator.go b/pkg/services/mocks/AOAPacketCreator.go index 89b671cafa5..b1f23ed19dc 100644 --- a/pkg/services/mocks/AOAPacketCreator.go +++ b/pkg/services/mocks/AOAPacketCreator.go @@ -19,6 +19,10 @@ type AOAPacketCreator struct { func (_m *AOAPacketCreator) CreateAOAPacket(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, isPaymentPacket bool) (afero.File, error) { ret := _m.Called(appCtx, ppmShipmentID, isPaymentPacket) + if len(ret) == 0 { + panic("no return value specified for CreateAOAPacket") + } + var r0 afero.File var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, bool) (afero.File, error)); ok { @@ -45,6 +49,10 @@ func (_m *AOAPacketCreator) CreateAOAPacket(appCtx appcontext.AppContext, ppmShi func (_m *AOAPacketCreator) VerifyAOAPacketInternal(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) error { ret := _m.Called(appCtx, ppmShipmentID) + if len(ret) == 0 { + panic("no return value specified for VerifyAOAPacketInternal") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) error); ok { r0 = rf(appCtx, ppmShipmentID) diff --git a/pkg/services/mocks/AdminUserCreator.go b/pkg/services/mocks/AdminUserCreator.go index b94e0f48d41..9d42ae33d87 100644 --- a/pkg/services/mocks/AdminUserCreator.go +++ b/pkg/services/mocks/AdminUserCreator.go @@ -22,6 +22,10 @@ type AdminUserCreator struct { func (_m *AdminUserCreator) CreateAdminUser(appCtx appcontext.AppContext, user *models.AdminUser, organizationIDFilter []services.QueryFilter) (*models.AdminUser, *validate.Errors, error) { ret := _m.Called(appCtx, user, organizationIDFilter) + if len(ret) == 0 { + panic("no return value specified for CreateAdminUser") + } + var r0 *models.AdminUser var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/AdminUserFetcher.go b/pkg/services/mocks/AdminUserFetcher.go index 89a173deb33..a22f5d6dda0 100644 --- a/pkg/services/mocks/AdminUserFetcher.go +++ b/pkg/services/mocks/AdminUserFetcher.go @@ -20,6 +20,10 @@ type AdminUserFetcher struct { func (_m *AdminUserFetcher) FetchAdminUser(appCtx appcontext.AppContext, filters []services.QueryFilter) (models.AdminUser, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchAdminUser") + } + var r0 models.AdminUser var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (models.AdminUser, error)); ok { diff --git a/pkg/services/mocks/AdminUserListFetcher.go b/pkg/services/mocks/AdminUserListFetcher.go index 1a1fd4235e1..dffca6b7e07 100644 --- a/pkg/services/mocks/AdminUserListFetcher.go +++ b/pkg/services/mocks/AdminUserListFetcher.go @@ -20,6 +20,10 @@ type AdminUserListFetcher struct { func (_m *AdminUserListFetcher) FetchAdminUserCount(appCtx appcontext.AppContext, filters []services.QueryFilter) (int, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchAdminUserCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (int, error)); ok { @@ -44,6 +48,10 @@ func (_m *AdminUserListFetcher) FetchAdminUserCount(appCtx appcontext.AppContext func (_m *AdminUserListFetcher) FetchAdminUserList(appCtx appcontext.AppContext, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) (models.AdminUsers, error) { ret := _m.Called(appCtx, filters, associations, pagination, ordering) + if len(ret) == 0 { + panic("no return value specified for FetchAdminUserList") + } + var r0 models.AdminUsers var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter, services.QueryAssociations, services.Pagination, services.QueryOrder) (models.AdminUsers, error)); ok { diff --git a/pkg/services/mocks/AdminUserUpdater.go b/pkg/services/mocks/AdminUserUpdater.go index 27cca8afcef..87182f64b29 100644 --- a/pkg/services/mocks/AdminUserUpdater.go +++ b/pkg/services/mocks/AdminUserUpdater.go @@ -24,6 +24,10 @@ type AdminUserUpdater struct { func (_m *AdminUserUpdater) UpdateAdminUser(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.AdminUserUpdate) (*models.AdminUser, *validate.Errors, error) { ret := _m.Called(appCtx, id, payload) + if len(ret) == 0 { + panic("no return value specified for UpdateAdminUser") + } + var r0 *models.AdminUser var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/ApprovedSITDurationUpdateCreator.go b/pkg/services/mocks/ApprovedSITDurationUpdateCreator.go index e3ed9f05dc0..315c2e84f2e 100644 --- a/pkg/services/mocks/ApprovedSITDurationUpdateCreator.go +++ b/pkg/services/mocks/ApprovedSITDurationUpdateCreator.go @@ -20,6 +20,10 @@ type ApprovedSITDurationUpdateCreator struct { func (_m *ApprovedSITDurationUpdateCreator) CreateApprovedSITDurationUpdate(appCtx appcontext.AppContext, sitDurationUpdate *models.SITDurationUpdate, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, sitDurationUpdate, shipmentID, eTag) + if len(ret) == 0 { + panic("no return value specified for CreateApprovedSITDurationUpdate") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.SITDurationUpdate, uuid.UUID, string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/BoatShipmentCreator.go b/pkg/services/mocks/BoatShipmentCreator.go index a15db7af6e4..9ed58d64a6b 100644 --- a/pkg/services/mocks/BoatShipmentCreator.go +++ b/pkg/services/mocks/BoatShipmentCreator.go @@ -18,6 +18,10 @@ type BoatShipmentCreator struct { func (_m *BoatShipmentCreator) CreateBoatShipmentWithDefaultCheck(appCtx appcontext.AppContext, boatshipment *models.BoatShipment) (*models.BoatShipment, error) { ret := _m.Called(appCtx, boatshipment) + if len(ret) == 0 { + panic("no return value specified for CreateBoatShipmentWithDefaultCheck") + } + var r0 *models.BoatShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.BoatShipment) (*models.BoatShipment, error)); ok { diff --git a/pkg/services/mocks/BoatShipmentFetcher.go b/pkg/services/mocks/BoatShipmentFetcher.go index 3de486dd9ee..d08661df0ee 100644 --- a/pkg/services/mocks/BoatShipmentFetcher.go +++ b/pkg/services/mocks/BoatShipmentFetcher.go @@ -20,6 +20,10 @@ type BoatShipmentFetcher struct { func (_m *BoatShipmentFetcher) GetBoatShipment(appCtx appcontext.AppContext, boatShipmentID uuid.UUID, eagerPreloadAssociations []string, postloadAssociations []string) (*models.BoatShipment, error) { ret := _m.Called(appCtx, boatShipmentID, eagerPreloadAssociations, postloadAssociations) + if len(ret) == 0 { + panic("no return value specified for GetBoatShipment") + } + var r0 *models.BoatShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, []string, []string) (*models.BoatShipment, error)); ok { @@ -46,6 +50,10 @@ func (_m *BoatShipmentFetcher) GetBoatShipment(appCtx appcontext.AppContext, boa func (_m *BoatShipmentFetcher) PostloadAssociations(appCtx appcontext.AppContext, boatShipment *models.BoatShipment, postloadAssociations []string) error { ret := _m.Called(appCtx, boatShipment, postloadAssociations) + if len(ret) == 0 { + panic("no return value specified for PostloadAssociations") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.BoatShipment, []string) error); ok { r0 = rf(appCtx, boatShipment, postloadAssociations) diff --git a/pkg/services/mocks/BoatShipmentUpdater.go b/pkg/services/mocks/BoatShipmentUpdater.go index d0a634c15bd..cb7db8d0e72 100644 --- a/pkg/services/mocks/BoatShipmentUpdater.go +++ b/pkg/services/mocks/BoatShipmentUpdater.go @@ -20,6 +20,10 @@ type BoatShipmentUpdater struct { func (_m *BoatShipmentUpdater) UpdateBoatShipmentWithDefaultCheck(appCtx appcontext.AppContext, boatshipment *models.BoatShipment, mtoShipmentID uuid.UUID) (*models.BoatShipment, error) { ret := _m.Called(appCtx, boatshipment, mtoShipmentID) + if len(ret) == 0 { + panic("no return value specified for UpdateBoatShipmentWithDefaultCheck") + } + var r0 *models.BoatShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.BoatShipment, uuid.UUID) (*models.BoatShipment, error)); ok { diff --git a/pkg/services/mocks/ClientCertCreator.go b/pkg/services/mocks/ClientCertCreator.go index 38c99bc6bb1..84bf860ea8a 100644 --- a/pkg/services/mocks/ClientCertCreator.go +++ b/pkg/services/mocks/ClientCertCreator.go @@ -20,6 +20,10 @@ type ClientCertCreator struct { func (_m *ClientCertCreator) CreateClientCert(appCtx appcontext.AppContext, email string, user *models.ClientCert) (*models.ClientCert, *validate.Errors, error) { ret := _m.Called(appCtx, email, user) + if len(ret) == 0 { + panic("no return value specified for CreateClientCert") + } + var r0 *models.ClientCert var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/ClientCertFetcher.go b/pkg/services/mocks/ClientCertFetcher.go index 4b46c44cb83..8b481443d49 100644 --- a/pkg/services/mocks/ClientCertFetcher.go +++ b/pkg/services/mocks/ClientCertFetcher.go @@ -20,6 +20,10 @@ type ClientCertFetcher struct { func (_m *ClientCertFetcher) FetchClientCert(appCtx appcontext.AppContext, filters []services.QueryFilter) (models.ClientCert, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchClientCert") + } + var r0 models.ClientCert var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (models.ClientCert, error)); ok { diff --git a/pkg/services/mocks/ClientCertListFetcher.go b/pkg/services/mocks/ClientCertListFetcher.go index 2d66dc2953a..8027441bcf6 100644 --- a/pkg/services/mocks/ClientCertListFetcher.go +++ b/pkg/services/mocks/ClientCertListFetcher.go @@ -20,6 +20,10 @@ type ClientCertListFetcher struct { func (_m *ClientCertListFetcher) FetchClientCertCount(appCtx appcontext.AppContext, filters []services.QueryFilter) (int, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchClientCertCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (int, error)); ok { @@ -44,6 +48,10 @@ func (_m *ClientCertListFetcher) FetchClientCertCount(appCtx appcontext.AppConte func (_m *ClientCertListFetcher) FetchClientCertList(appCtx appcontext.AppContext, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) (models.ClientCerts, error) { ret := _m.Called(appCtx, filters, associations, pagination, ordering) + if len(ret) == 0 { + panic("no return value specified for FetchClientCertList") + } + var r0 models.ClientCerts var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter, services.QueryAssociations, services.Pagination, services.QueryOrder) (models.ClientCerts, error)); ok { diff --git a/pkg/services/mocks/ClientCertRemover.go b/pkg/services/mocks/ClientCertRemover.go index 3218c918679..29676ea21bf 100644 --- a/pkg/services/mocks/ClientCertRemover.go +++ b/pkg/services/mocks/ClientCertRemover.go @@ -22,6 +22,10 @@ type ClientCertRemover struct { func (_m *ClientCertRemover) RemoveClientCert(appCtx appcontext.AppContext, id uuid.UUID) (*models.ClientCert, *validate.Errors, error) { ret := _m.Called(appCtx, id) + if len(ret) == 0 { + panic("no return value specified for RemoveClientCert") + } + var r0 *models.ClientCert var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/ClientCertUpdater.go b/pkg/services/mocks/ClientCertUpdater.go index 84d765435c9..a1103b4f695 100644 --- a/pkg/services/mocks/ClientCertUpdater.go +++ b/pkg/services/mocks/ClientCertUpdater.go @@ -24,6 +24,10 @@ type ClientCertUpdater struct { func (_m *ClientCertUpdater) UpdateClientCert(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.ClientCertificateUpdate) (*models.ClientCert, *validate.Errors, error) { ret := _m.Called(appCtx, id, payload) + if len(ret) == 0 { + panic("no return value specified for UpdateClientCert") + } + var r0 *models.ClientCert var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/CounselingServicesPricer.go b/pkg/services/mocks/CounselingServicesPricer.go index 1b6400c5a1b..4262468e29f 100644 --- a/pkg/services/mocks/CounselingServicesPricer.go +++ b/pkg/services/mocks/CounselingServicesPricer.go @@ -22,6 +22,10 @@ type CounselingServicesPricer struct { func (_m *CounselingServicesPricer) Price(appCtx appcontext.AppContext, lockedPriceCents *unit.Cents) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, lockedPriceCents) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -55,6 +59,10 @@ func (_m *CounselingServicesPricer) Price(appCtx appcontext.AppContext, lockedPr func (_m *CounselingServicesPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/CustomerFetcher.go b/pkg/services/mocks/CustomerFetcher.go index 04b8a84120b..0dd0883ab4a 100644 --- a/pkg/services/mocks/CustomerFetcher.go +++ b/pkg/services/mocks/CustomerFetcher.go @@ -20,6 +20,10 @@ type CustomerFetcher struct { func (_m *CustomerFetcher) FetchCustomer(appCtx appcontext.AppContext, customerID uuid.UUID) (*models.ServiceMember, error) { ret := _m.Called(appCtx, customerID) + if len(ret) == 0 { + panic("no return value specified for FetchCustomer") + } + var r0 *models.ServiceMember var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.ServiceMember, error)); ok { diff --git a/pkg/services/mocks/CustomerSearcher.go b/pkg/services/mocks/CustomerSearcher.go index 5171ad01115..6193f61e12b 100644 --- a/pkg/services/mocks/CustomerSearcher.go +++ b/pkg/services/mocks/CustomerSearcher.go @@ -20,6 +20,10 @@ type CustomerSearcher struct { func (_m *CustomerSearcher) SearchCustomers(appCtx appcontext.AppContext, params *services.SearchCustomersParams) (models.ServiceMemberSearchResults, int, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for SearchCustomers") + } + var r0 models.ServiceMemberSearchResults var r1 int var r2 error diff --git a/pkg/services/mocks/CustomerSupportRemarkDeleter.go b/pkg/services/mocks/CustomerSupportRemarkDeleter.go index bbb3330b258..67e54d8b8f8 100644 --- a/pkg/services/mocks/CustomerSupportRemarkDeleter.go +++ b/pkg/services/mocks/CustomerSupportRemarkDeleter.go @@ -18,6 +18,10 @@ type CustomerSupportRemarkDeleter struct { func (_m *CustomerSupportRemarkDeleter) DeleteCustomerSupportRemark(appCtx appcontext.AppContext, customerSupportRemarkID uuid.UUID) error { ret := _m.Called(appCtx, customerSupportRemarkID) + if len(ret) == 0 { + panic("no return value specified for DeleteCustomerSupportRemark") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) error); ok { r0 = rf(appCtx, customerSupportRemarkID) diff --git a/pkg/services/mocks/CustomerSupportRemarkUpdater.go b/pkg/services/mocks/CustomerSupportRemarkUpdater.go index 7a019e776d5..8a23eb415d5 100644 --- a/pkg/services/mocks/CustomerSupportRemarkUpdater.go +++ b/pkg/services/mocks/CustomerSupportRemarkUpdater.go @@ -19,6 +19,10 @@ type CustomerSupportRemarkUpdater struct { func (_m *CustomerSupportRemarkUpdater) UpdateCustomerSupportRemark(appCtx appcontext.AppContext, params customer_support_remarks.UpdateCustomerSupportRemarkForMoveParams) (*models.CustomerSupportRemark, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for UpdateCustomerSupportRemark") + } + var r0 *models.CustomerSupportRemark var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, customer_support_remarks.UpdateCustomerSupportRemarkForMoveParams) (*models.CustomerSupportRemark, error)); ok { diff --git a/pkg/services/mocks/CustomerSupportRemarksCreator.go b/pkg/services/mocks/CustomerSupportRemarksCreator.go index ff5dbf8972c..3ca8da03a31 100644 --- a/pkg/services/mocks/CustomerSupportRemarksCreator.go +++ b/pkg/services/mocks/CustomerSupportRemarksCreator.go @@ -18,6 +18,10 @@ type CustomerSupportRemarksCreator struct { func (_m *CustomerSupportRemarksCreator) CreateCustomerSupportRemark(appCtx appcontext.AppContext, customerSupportRemark *models.CustomerSupportRemark, moveCode string) (*models.CustomerSupportRemark, error) { ret := _m.Called(appCtx, customerSupportRemark, moveCode) + if len(ret) == 0 { + panic("no return value specified for CreateCustomerSupportRemark") + } + var r0 *models.CustomerSupportRemark var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.CustomerSupportRemark, string) (*models.CustomerSupportRemark, error)); ok { diff --git a/pkg/services/mocks/CustomerSupportRemarksFetcher.go b/pkg/services/mocks/CustomerSupportRemarksFetcher.go index 3435ab01efb..bf1fc0d6463 100644 --- a/pkg/services/mocks/CustomerSupportRemarksFetcher.go +++ b/pkg/services/mocks/CustomerSupportRemarksFetcher.go @@ -18,6 +18,10 @@ type CustomerSupportRemarksFetcher struct { func (_m *CustomerSupportRemarksFetcher) ListCustomerSupportRemarks(appCtx appcontext.AppContext, moveCode string) (*models.CustomerSupportRemarks, error) { ret := _m.Called(appCtx, moveCode) + if len(ret) == 0 { + panic("no return value specified for ListCustomerSupportRemarks") + } + var r0 *models.CustomerSupportRemarks var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string) (*models.CustomerSupportRemarks, error)); ok { diff --git a/pkg/services/mocks/CustomerUpdater.go b/pkg/services/mocks/CustomerUpdater.go index 46aa93e30be..afb1c17a7d9 100644 --- a/pkg/services/mocks/CustomerUpdater.go +++ b/pkg/services/mocks/CustomerUpdater.go @@ -18,6 +18,10 @@ type CustomerUpdater struct { func (_m *CustomerUpdater) UpdateCustomer(appCtx appcontext.AppContext, eTag string, customer models.ServiceMember) (*models.ServiceMember, error) { ret := _m.Called(appCtx, eTag, customer) + if len(ret) == 0 { + panic("no return value specified for UpdateCustomer") + } + var r0 *models.ServiceMember var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, models.ServiceMember) (*models.ServiceMember, error)); ok { diff --git a/pkg/services/mocks/DateSelectionChecker.go b/pkg/services/mocks/DateSelectionChecker.go index d5f42ea3f12..322a09924a2 100644 --- a/pkg/services/mocks/DateSelectionChecker.go +++ b/pkg/services/mocks/DateSelectionChecker.go @@ -20,6 +20,10 @@ type DateSelectionChecker struct { func (_m *DateSelectionChecker) IsDateWeekendHoliday(appCtx appcontext.AppContext, countryCode string, date time.Time) (*services.IsDateWeekendHolidayInfo, error) { ret := _m.Called(appCtx, countryCode, date) + if len(ret) == 0 { + panic("no return value specified for IsDateWeekendHoliday") + } + var r0 *services.IsDateWeekendHolidayInfo var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, time.Time) (*services.IsDateWeekendHolidayInfo, error)); ok { diff --git a/pkg/services/mocks/DomesticAdditionalDaysSITPricer.go b/pkg/services/mocks/DomesticAdditionalDaysSITPricer.go index aaf487bf910..c8a699518d8 100644 --- a/pkg/services/mocks/DomesticAdditionalDaysSITPricer.go +++ b/pkg/services/mocks/DomesticAdditionalDaysSITPricer.go @@ -24,6 +24,10 @@ type DomesticAdditionalDaysSITPricer struct { func (_m *DomesticAdditionalDaysSITPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, numberOfDaysInSIT int, disableWeightMinimum bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, numberOfDaysInSIT, disableWeightMinimum) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticAdditionalDaysSITPricer) Price(appCtx appcontext.AppContext, c func (_m *DomesticAdditionalDaysSITPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticCratingPricer.go b/pkg/services/mocks/DomesticCratingPricer.go index 909b704749c..9ea64daff55 100644 --- a/pkg/services/mocks/DomesticCratingPricer.go +++ b/pkg/services/mocks/DomesticCratingPricer.go @@ -24,6 +24,10 @@ type DomesticCratingPricer struct { func (_m *DomesticCratingPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, billedCubicFeet unit.CubicFeet, servicesScheduleOrigin int, standaloneCrate bool, standaloneCrateCap unit.Cents) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, billedCubicFeet, servicesScheduleOrigin, standaloneCrate, standaloneCrateCap) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticCratingPricer) Price(appCtx appcontext.AppContext, contractCod func (_m *DomesticCratingPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticDestinationAdditionalDaysSITPricer.go b/pkg/services/mocks/DomesticDestinationAdditionalDaysSITPricer.go index d917a461fd0..274e7b809e6 100644 --- a/pkg/services/mocks/DomesticDestinationAdditionalDaysSITPricer.go +++ b/pkg/services/mocks/DomesticDestinationAdditionalDaysSITPricer.go @@ -24,6 +24,10 @@ type DomesticDestinationAdditionalDaysSITPricer struct { func (_m *DomesticDestinationAdditionalDaysSITPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, numberOfDaysInSIT int, disableWeightMinimum bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, numberOfDaysInSIT, disableWeightMinimum) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticDestinationAdditionalDaysSITPricer) Price(appCtx appcontext.Ap func (_m *DomesticDestinationAdditionalDaysSITPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticDestinationFirstDaySITPricer.go b/pkg/services/mocks/DomesticDestinationFirstDaySITPricer.go index c1b4529994c..5f60d41b12f 100644 --- a/pkg/services/mocks/DomesticDestinationFirstDaySITPricer.go +++ b/pkg/services/mocks/DomesticDestinationFirstDaySITPricer.go @@ -24,6 +24,10 @@ type DomesticDestinationFirstDaySITPricer struct { func (_m *DomesticDestinationFirstDaySITPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, disableWeightMinimum bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, disableWeightMinimum) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticDestinationFirstDaySITPricer) Price(appCtx appcontext.AppConte func (_m *DomesticDestinationFirstDaySITPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticDestinationPricer.go b/pkg/services/mocks/DomesticDestinationPricer.go index e33835f1dbc..2ff53458a18 100644 --- a/pkg/services/mocks/DomesticDestinationPricer.go +++ b/pkg/services/mocks/DomesticDestinationPricer.go @@ -24,6 +24,10 @@ type DomesticDestinationPricer struct { func (_m *DomesticDestinationPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, isPPM bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, isPPM) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticDestinationPricer) Price(appCtx appcontext.AppContext, contrac func (_m *DomesticDestinationPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticDestinationSITDeliveryPricer.go b/pkg/services/mocks/DomesticDestinationSITDeliveryPricer.go index bafbd3f16d9..049c9048875 100644 --- a/pkg/services/mocks/DomesticDestinationSITDeliveryPricer.go +++ b/pkg/services/mocks/DomesticDestinationSITDeliveryPricer.go @@ -24,6 +24,10 @@ type DomesticDestinationSITDeliveryPricer struct { func (_m *DomesticDestinationSITDeliveryPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, sitSchedule int, zipDest string, zipSITDest string, distance unit.Miles) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, sitSchedule, zipDest, zipSITDest, distance) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticDestinationSITDeliveryPricer) Price(appCtx appcontext.AppConte func (_m *DomesticDestinationSITDeliveryPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticDestinationSITFuelSurchargePricer.go b/pkg/services/mocks/DomesticDestinationSITFuelSurchargePricer.go index 470aba3cd3a..0747cef9144 100644 --- a/pkg/services/mocks/DomesticDestinationSITFuelSurchargePricer.go +++ b/pkg/services/mocks/DomesticDestinationSITFuelSurchargePricer.go @@ -24,6 +24,10 @@ type DomesticDestinationSITFuelSurchargePricer struct { func (_m *DomesticDestinationSITFuelSurchargePricer) Price(appCtx appcontext.AppContext, actualPickupDate time.Time, distance unit.Miles, weight unit.Pound, fscWeightBasedDistanceMultiplier float64, eiaFuelPrice unit.Millicents, isPPM bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, actualPickupDate, distance, weight, fscWeightBasedDistanceMultiplier, eiaFuelPrice, isPPM) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticDestinationSITFuelSurchargePricer) Price(appCtx appcontext.App func (_m *DomesticDestinationSITFuelSurchargePricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticDestinationShuttlingPricer.go b/pkg/services/mocks/DomesticDestinationShuttlingPricer.go index 35edf7fd0e5..44f9eeef434 100644 --- a/pkg/services/mocks/DomesticDestinationShuttlingPricer.go +++ b/pkg/services/mocks/DomesticDestinationShuttlingPricer.go @@ -24,6 +24,10 @@ type DomesticDestinationShuttlingPricer struct { func (_m *DomesticDestinationShuttlingPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleDest int) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, servicesScheduleDest) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticDestinationShuttlingPricer) Price(appCtx appcontext.AppContext func (_m *DomesticDestinationShuttlingPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticFirstDaySITPricer.go b/pkg/services/mocks/DomesticFirstDaySITPricer.go index 298c96f1a29..cd368b75c3c 100644 --- a/pkg/services/mocks/DomesticFirstDaySITPricer.go +++ b/pkg/services/mocks/DomesticFirstDaySITPricer.go @@ -24,6 +24,10 @@ type DomesticFirstDaySITPricer struct { func (_m *DomesticFirstDaySITPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, disableWeightMinimum bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, disableWeightMinimum) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticFirstDaySITPricer) Price(appCtx appcontext.AppContext, contrac func (_m *DomesticFirstDaySITPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticLinehaulPricer.go b/pkg/services/mocks/DomesticLinehaulPricer.go index bcd2b73af38..39cccf3523c 100644 --- a/pkg/services/mocks/DomesticLinehaulPricer.go +++ b/pkg/services/mocks/DomesticLinehaulPricer.go @@ -24,6 +24,10 @@ type DomesticLinehaulPricer struct { func (_m *DomesticLinehaulPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, distance unit.Miles, weight unit.Pound, serviceArea string, isPPM bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, distance, weight, serviceArea, isPPM) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticLinehaulPricer) Price(appCtx appcontext.AppContext, contractCo func (_m *DomesticLinehaulPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticNTSPackPricer.go b/pkg/services/mocks/DomesticNTSPackPricer.go index fcea7019dc7..0bf6c9d0107 100644 --- a/pkg/services/mocks/DomesticNTSPackPricer.go +++ b/pkg/services/mocks/DomesticNTSPackPricer.go @@ -24,6 +24,10 @@ type DomesticNTSPackPricer struct { func (_m *DomesticNTSPackPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleOrigin int, isPPM bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, servicesScheduleOrigin, isPPM) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticNTSPackPricer) Price(appCtx appcontext.AppContext, contractCod func (_m *DomesticNTSPackPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticOriginAdditionalDaysSITPricer.go b/pkg/services/mocks/DomesticOriginAdditionalDaysSITPricer.go index 5a6f6ea5631..7f5b8abd7a7 100644 --- a/pkg/services/mocks/DomesticOriginAdditionalDaysSITPricer.go +++ b/pkg/services/mocks/DomesticOriginAdditionalDaysSITPricer.go @@ -24,6 +24,10 @@ type DomesticOriginAdditionalDaysSITPricer struct { func (_m *DomesticOriginAdditionalDaysSITPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, numberOfDaysInSIT int, disableWeightMinimum bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, numberOfDaysInSIT, disableWeightMinimum) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticOriginAdditionalDaysSITPricer) Price(appCtx appcontext.AppCont func (_m *DomesticOriginAdditionalDaysSITPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticOriginFirstDaySITPricer.go b/pkg/services/mocks/DomesticOriginFirstDaySITPricer.go index 0441a4c6dce..d78350d8887 100644 --- a/pkg/services/mocks/DomesticOriginFirstDaySITPricer.go +++ b/pkg/services/mocks/DomesticOriginFirstDaySITPricer.go @@ -24,6 +24,10 @@ type DomesticOriginFirstDaySITPricer struct { func (_m *DomesticOriginFirstDaySITPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, disableWeightMinimum bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, disableWeightMinimum) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticOriginFirstDaySITPricer) Price(appCtx appcontext.AppContext, c func (_m *DomesticOriginFirstDaySITPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticOriginPricer.go b/pkg/services/mocks/DomesticOriginPricer.go index 438b798b4aa..84be80a8a5b 100644 --- a/pkg/services/mocks/DomesticOriginPricer.go +++ b/pkg/services/mocks/DomesticOriginPricer.go @@ -24,6 +24,10 @@ type DomesticOriginPricer struct { func (_m *DomesticOriginPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, isPPM bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, isPPM) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticOriginPricer) Price(appCtx appcontext.AppContext, contractCode func (_m *DomesticOriginPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticOriginSITFuelSurchargePricer.go b/pkg/services/mocks/DomesticOriginSITFuelSurchargePricer.go index 58de1dd9744..db180211a45 100644 --- a/pkg/services/mocks/DomesticOriginSITFuelSurchargePricer.go +++ b/pkg/services/mocks/DomesticOriginSITFuelSurchargePricer.go @@ -24,6 +24,10 @@ type DomesticOriginSITFuelSurchargePricer struct { func (_m *DomesticOriginSITFuelSurchargePricer) Price(appCtx appcontext.AppContext, actualPickupDate time.Time, distance unit.Miles, weight unit.Pound, fscWeightBasedDistanceMultiplier float64, eiaFuelPrice unit.Millicents, isPPM bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, actualPickupDate, distance, weight, fscWeightBasedDistanceMultiplier, eiaFuelPrice, isPPM) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticOriginSITFuelSurchargePricer) Price(appCtx appcontext.AppConte func (_m *DomesticOriginSITFuelSurchargePricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticOriginSITPickupPricer.go b/pkg/services/mocks/DomesticOriginSITPickupPricer.go index 2061c4bab57..d344bc96549 100644 --- a/pkg/services/mocks/DomesticOriginSITPickupPricer.go +++ b/pkg/services/mocks/DomesticOriginSITPickupPricer.go @@ -24,6 +24,10 @@ type DomesticOriginSITPickupPricer struct { func (_m *DomesticOriginSITPickupPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, serviceArea string, sitSchedule int, zipSITOriginOriginal string, zipSITOriginActual string, distance unit.Miles) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, serviceArea, sitSchedule, zipSITOriginOriginal, zipSITOriginActual, distance) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticOriginSITPickupPricer) Price(appCtx appcontext.AppContext, con func (_m *DomesticOriginSITPickupPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticOriginShuttlingPricer.go b/pkg/services/mocks/DomesticOriginShuttlingPricer.go index 040999a62e5..a16ed011ef5 100644 --- a/pkg/services/mocks/DomesticOriginShuttlingPricer.go +++ b/pkg/services/mocks/DomesticOriginShuttlingPricer.go @@ -24,6 +24,10 @@ type DomesticOriginShuttlingPricer struct { func (_m *DomesticOriginShuttlingPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleOrigin int) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, servicesScheduleOrigin) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticOriginShuttlingPricer) Price(appCtx appcontext.AppContext, con func (_m *DomesticOriginShuttlingPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticPackPricer.go b/pkg/services/mocks/DomesticPackPricer.go index 8334cd0ffec..210f0e0742b 100644 --- a/pkg/services/mocks/DomesticPackPricer.go +++ b/pkg/services/mocks/DomesticPackPricer.go @@ -24,6 +24,10 @@ type DomesticPackPricer struct { func (_m *DomesticPackPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleOrigin int, isPPM bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, servicesScheduleOrigin, isPPM) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticPackPricer) Price(appCtx appcontext.AppContext, contractCode s func (_m *DomesticPackPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticShorthaulPricer.go b/pkg/services/mocks/DomesticShorthaulPricer.go index d1d10398f96..029872ef7e4 100644 --- a/pkg/services/mocks/DomesticShorthaulPricer.go +++ b/pkg/services/mocks/DomesticShorthaulPricer.go @@ -24,6 +24,10 @@ type DomesticShorthaulPricer struct { func (_m *DomesticShorthaulPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, distance unit.Miles, weight unit.Pound, serviceArea string) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, distance, weight, serviceArea) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticShorthaulPricer) Price(appCtx appcontext.AppContext, contractC func (_m *DomesticShorthaulPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticUncratingPricer.go b/pkg/services/mocks/DomesticUncratingPricer.go index 1baf4c02be2..0b23ab9e64c 100644 --- a/pkg/services/mocks/DomesticUncratingPricer.go +++ b/pkg/services/mocks/DomesticUncratingPricer.go @@ -24,6 +24,10 @@ type DomesticUncratingPricer struct { func (_m *DomesticUncratingPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, billedCubicFeet unit.CubicFeet, servicesScheduleDest int) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, billedCubicFeet, servicesScheduleDest) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticUncratingPricer) Price(appCtx appcontext.AppContext, contractC func (_m *DomesticUncratingPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/DomesticUnpackPricer.go b/pkg/services/mocks/DomesticUnpackPricer.go index e23817f77e3..005a3825503 100644 --- a/pkg/services/mocks/DomesticUnpackPricer.go +++ b/pkg/services/mocks/DomesticUnpackPricer.go @@ -24,6 +24,10 @@ type DomesticUnpackPricer struct { func (_m *DomesticUnpackPricer) Price(appCtx appcontext.AppContext, contractCode string, requestedPickupDate time.Time, weight unit.Pound, servicesScheduleDest int, isPPM bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, contractCode, requestedPickupDate, weight, servicesScheduleDest, isPPM) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *DomesticUnpackPricer) Price(appCtx appcontext.AppContext, contractCode func (_m *DomesticUnpackPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/ElectronicOrderCategoryCountFetcher.go b/pkg/services/mocks/ElectronicOrderCategoryCountFetcher.go index 07b3508c1d0..2d7aca08c98 100644 --- a/pkg/services/mocks/ElectronicOrderCategoryCountFetcher.go +++ b/pkg/services/mocks/ElectronicOrderCategoryCountFetcher.go @@ -18,6 +18,10 @@ type ElectronicOrderCategoryCountFetcher struct { func (_m *ElectronicOrderCategoryCountFetcher) FetchElectronicOrderCategoricalCounts(appCtx appcontext.AppContext, filters []services.QueryFilter, andFilters *[]services.QueryFilter) (map[interface{}]int, error) { ret := _m.Called(appCtx, filters, andFilters) + if len(ret) == 0 { + panic("no return value specified for FetchElectronicOrderCategoricalCounts") + } + var r0 map[interface{}]int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter, *[]services.QueryFilter) (map[interface{}]int, error)); ok { diff --git a/pkg/services/mocks/ElectronicOrderListFetcher.go b/pkg/services/mocks/ElectronicOrderListFetcher.go index 6d0cb0cc78e..1b4cfce7878 100644 --- a/pkg/services/mocks/ElectronicOrderListFetcher.go +++ b/pkg/services/mocks/ElectronicOrderListFetcher.go @@ -20,6 +20,10 @@ type ElectronicOrderListFetcher struct { func (_m *ElectronicOrderListFetcher) FetchElectronicOrderCount(appCtx appcontext.AppContext, filters []services.QueryFilter) (int, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchElectronicOrderCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (int, error)); ok { @@ -44,6 +48,10 @@ func (_m *ElectronicOrderListFetcher) FetchElectronicOrderCount(appCtx appcontex func (_m *ElectronicOrderListFetcher) FetchElectronicOrderList(appCtx appcontext.AppContext, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) (models.ElectronicOrders, error) { ret := _m.Called(appCtx, filters, associations, pagination, ordering) + if len(ret) == 0 { + panic("no return value specified for FetchElectronicOrderList") + } + var r0 models.ElectronicOrders var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter, services.QueryAssociations, services.Pagination, services.QueryOrder) (models.ElectronicOrders, error)); ok { diff --git a/pkg/services/mocks/EvaluationReportCreator.go b/pkg/services/mocks/EvaluationReportCreator.go index 0e4d9688bbf..0ce91f80a8b 100644 --- a/pkg/services/mocks/EvaluationReportCreator.go +++ b/pkg/services/mocks/EvaluationReportCreator.go @@ -18,6 +18,10 @@ type EvaluationReportCreator struct { func (_m *EvaluationReportCreator) CreateEvaluationReport(appCtx appcontext.AppContext, evaluationReport *models.EvaluationReport, locator string) (*models.EvaluationReport, error) { ret := _m.Called(appCtx, evaluationReport, locator) + if len(ret) == 0 { + panic("no return value specified for CreateEvaluationReport") + } + var r0 *models.EvaluationReport var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.EvaluationReport, string) (*models.EvaluationReport, error)); ok { diff --git a/pkg/services/mocks/EvaluationReportDeleter.go b/pkg/services/mocks/EvaluationReportDeleter.go index 24698d93e1e..b333ee186f0 100644 --- a/pkg/services/mocks/EvaluationReportDeleter.go +++ b/pkg/services/mocks/EvaluationReportDeleter.go @@ -18,6 +18,10 @@ type EvaluationReportDeleter struct { func (_m *EvaluationReportDeleter) DeleteEvaluationReport(appCtx appcontext.AppContext, reportID uuid.UUID) error { ret := _m.Called(appCtx, reportID) + if len(ret) == 0 { + panic("no return value specified for DeleteEvaluationReport") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) error); ok { r0 = rf(appCtx, reportID) diff --git a/pkg/services/mocks/EvaluationReportFetcher.go b/pkg/services/mocks/EvaluationReportFetcher.go index 66f776a40c9..b1d98ffeb20 100644 --- a/pkg/services/mocks/EvaluationReportFetcher.go +++ b/pkg/services/mocks/EvaluationReportFetcher.go @@ -20,6 +20,10 @@ type EvaluationReportFetcher struct { func (_m *EvaluationReportFetcher) FetchEvaluationReportByID(appCtx appcontext.AppContext, reportID uuid.UUID, officeUserID uuid.UUID) (*models.EvaluationReport, error) { ret := _m.Called(appCtx, reportID, officeUserID) + if len(ret) == 0 { + panic("no return value specified for FetchEvaluationReportByID") + } + var r0 *models.EvaluationReport var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, uuid.UUID) (*models.EvaluationReport, error)); ok { @@ -46,6 +50,10 @@ func (_m *EvaluationReportFetcher) FetchEvaluationReportByID(appCtx appcontext.A func (_m *EvaluationReportFetcher) FetchEvaluationReports(appCtx appcontext.AppContext, reportType models.EvaluationReportType, moveID uuid.UUID, officeUserID uuid.UUID) (models.EvaluationReports, error) { ret := _m.Called(appCtx, reportType, moveID, officeUserID) + if len(ret) == 0 { + panic("no return value specified for FetchEvaluationReports") + } + var r0 models.EvaluationReports var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.EvaluationReportType, uuid.UUID, uuid.UUID) (models.EvaluationReports, error)); ok { diff --git a/pkg/services/mocks/EvaluationReportUpdater.go b/pkg/services/mocks/EvaluationReportUpdater.go index 7a370808def..4dd745c8af5 100644 --- a/pkg/services/mocks/EvaluationReportUpdater.go +++ b/pkg/services/mocks/EvaluationReportUpdater.go @@ -20,6 +20,10 @@ type EvaluationReportUpdater struct { func (_m *EvaluationReportUpdater) SubmitEvaluationReport(appCtx appcontext.AppContext, evaluationReportID uuid.UUID, officeUserID uuid.UUID, eTag string) error { ret := _m.Called(appCtx, evaluationReportID, officeUserID, eTag) + if len(ret) == 0 { + panic("no return value specified for SubmitEvaluationReport") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, uuid.UUID, string) error); ok { r0 = rf(appCtx, evaluationReportID, officeUserID, eTag) @@ -34,6 +38,10 @@ func (_m *EvaluationReportUpdater) SubmitEvaluationReport(appCtx appcontext.AppC func (_m *EvaluationReportUpdater) UpdateEvaluationReport(appCtx appcontext.AppContext, evaluationReport *models.EvaluationReport, officeUserID uuid.UUID, eTag string) error { ret := _m.Called(appCtx, evaluationReport, officeUserID, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateEvaluationReport") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.EvaluationReport, uuid.UUID, string) error); ok { r0 = rf(appCtx, evaluationReport, officeUserID, eTag) diff --git a/pkg/services/mocks/ExcessWeightRiskManager.go b/pkg/services/mocks/ExcessWeightRiskManager.go index b9c682c81b4..aad764a01cd 100644 --- a/pkg/services/mocks/ExcessWeightRiskManager.go +++ b/pkg/services/mocks/ExcessWeightRiskManager.go @@ -20,6 +20,10 @@ type ExcessWeightRiskManager struct { func (_m *ExcessWeightRiskManager) AcknowledgeExcessWeightRisk(appCtx appcontext.AppContext, moveID uuid.UUID, eTag string) (*models.Move, error) { ret := _m.Called(appCtx, moveID, eTag) + if len(ret) == 0 { + panic("no return value specified for AcknowledgeExcessWeightRisk") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string) (*models.Move, error)); ok { @@ -46,6 +50,10 @@ func (_m *ExcessWeightRiskManager) AcknowledgeExcessWeightRisk(appCtx appcontext func (_m *ExcessWeightRiskManager) UpdateBillableWeightAsTOO(appCtx appcontext.AppContext, orderID uuid.UUID, weight *int, eTag string) (*models.Order, uuid.UUID, error) { ret := _m.Called(appCtx, orderID, weight, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateBillableWeightAsTOO") + } + var r0 *models.Order var r1 uuid.UUID var r2 error @@ -81,6 +89,10 @@ func (_m *ExcessWeightRiskManager) UpdateBillableWeightAsTOO(appCtx appcontext.A func (_m *ExcessWeightRiskManager) UpdateMaxBillableWeightAsTIO(appCtx appcontext.AppContext, orderID uuid.UUID, weight *int, remarks *string, eTag string) (*models.Order, uuid.UUID, error) { ret := _m.Called(appCtx, orderID, weight, remarks, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateMaxBillableWeightAsTIO") + } + var r0 *models.Order var r1 uuid.UUID var r2 error diff --git a/pkg/services/mocks/FeatureFlagFetcher.go b/pkg/services/mocks/FeatureFlagFetcher.go index fdba9227099..9e8908ce48e 100644 --- a/pkg/services/mocks/FeatureFlagFetcher.go +++ b/pkg/services/mocks/FeatureFlagFetcher.go @@ -23,6 +23,10 @@ type FeatureFlagFetcher struct { func (_m *FeatureFlagFetcher) GetBooleanFlag(ctx context.Context, logger *zap.Logger, entityID string, key string, flagContext map[string]string) (services.FeatureFlag, error) { ret := _m.Called(ctx, logger, entityID, key, flagContext) + if len(ret) == 0 { + panic("no return value specified for GetBooleanFlag") + } + var r0 services.FeatureFlag var r1 error if rf, ok := ret.Get(0).(func(context.Context, *zap.Logger, string, string, map[string]string) (services.FeatureFlag, error)); ok { @@ -47,6 +51,10 @@ func (_m *FeatureFlagFetcher) GetBooleanFlag(ctx context.Context, logger *zap.Lo func (_m *FeatureFlagFetcher) GetBooleanFlagForUser(ctx context.Context, appCtx appcontext.AppContext, key string, flagContext map[string]string) (services.FeatureFlag, error) { ret := _m.Called(ctx, appCtx, key, flagContext) + if len(ret) == 0 { + panic("no return value specified for GetBooleanFlagForUser") + } + var r0 services.FeatureFlag var r1 error if rf, ok := ret.Get(0).(func(context.Context, appcontext.AppContext, string, map[string]string) (services.FeatureFlag, error)); ok { @@ -71,6 +79,10 @@ func (_m *FeatureFlagFetcher) GetBooleanFlagForUser(ctx context.Context, appCtx func (_m *FeatureFlagFetcher) GetVariantFlag(ctx context.Context, logger *zap.Logger, entityID string, key string, flagContext map[string]string) (services.FeatureFlag, error) { ret := _m.Called(ctx, logger, entityID, key, flagContext) + if len(ret) == 0 { + panic("no return value specified for GetVariantFlag") + } + var r0 services.FeatureFlag var r1 error if rf, ok := ret.Get(0).(func(context.Context, *zap.Logger, string, string, map[string]string) (services.FeatureFlag, error)); ok { @@ -95,6 +107,10 @@ func (_m *FeatureFlagFetcher) GetVariantFlag(ctx context.Context, logger *zap.Lo func (_m *FeatureFlagFetcher) GetVariantFlagForUser(ctx context.Context, appCtx appcontext.AppContext, key string, flagContext map[string]string) (services.FeatureFlag, error) { ret := _m.Called(ctx, appCtx, key, flagContext) + if len(ret) == 0 { + panic("no return value specified for GetVariantFlagForUser") + } + var r0 services.FeatureFlag var r1 error if rf, ok := ret.Get(0).(func(context.Context, appcontext.AppContext, string, map[string]string) (services.FeatureFlag, error)); ok { diff --git a/pkg/services/mocks/Fetcher.go b/pkg/services/mocks/Fetcher.go index e5998153bce..01a8f1fabc0 100644 --- a/pkg/services/mocks/Fetcher.go +++ b/pkg/services/mocks/Fetcher.go @@ -18,6 +18,10 @@ type Fetcher struct { func (_m *Fetcher) FetchRecord(appCtx appcontext.AppContext, model interface{}, filters []services.QueryFilter) error { ret := _m.Called(appCtx, model, filters) + if len(ret) == 0 { + panic("no return value specified for FetchRecord") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, interface{}, []services.QueryFilter) error); ok { r0 = rf(appCtx, model, filters) diff --git a/pkg/services/mocks/FuelSurchargePricer.go b/pkg/services/mocks/FuelSurchargePricer.go index 413c0e4da4e..047e6f22b08 100644 --- a/pkg/services/mocks/FuelSurchargePricer.go +++ b/pkg/services/mocks/FuelSurchargePricer.go @@ -24,6 +24,10 @@ type FuelSurchargePricer struct { func (_m *FuelSurchargePricer) Price(appCtx appcontext.AppContext, actualPickupDate time.Time, distance unit.Miles, weight unit.Pound, fscWeightBasedDistanceMultiplier float64, eiaFuelPrice unit.Millicents, isPPM bool) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, actualPickupDate, distance, weight, fscWeightBasedDistanceMultiplier, eiaFuelPrice, isPPM) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -57,6 +61,10 @@ func (_m *FuelSurchargePricer) Price(appCtx appcontext.AppContext, actualPickupD func (_m *FuelSurchargePricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/GHCPaymentRequestInvoiceGenerator.go b/pkg/services/mocks/GHCPaymentRequestInvoiceGenerator.go index 56bd3908cff..936958b84e0 100644 --- a/pkg/services/mocks/GHCPaymentRequestInvoiceGenerator.go +++ b/pkg/services/mocks/GHCPaymentRequestInvoiceGenerator.go @@ -20,6 +20,10 @@ type GHCPaymentRequestInvoiceGenerator struct { func (_m *GHCPaymentRequestInvoiceGenerator) Generate(appCtx appcontext.AppContext, paymentRequest models.PaymentRequest, sendProductionInvoice bool) (ediinvoice.Invoice858C, error) { ret := _m.Called(appCtx, paymentRequest, sendProductionInvoice) + if len(ret) == 0 { + panic("no return value specified for Generate") + } + var r0 ediinvoice.Invoice858C var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.PaymentRequest, bool) (ediinvoice.Invoice858C, error)); ok { diff --git a/pkg/services/mocks/GexSender.go b/pkg/services/mocks/GexSender.go index d1e48a130b2..6d57bddcab8 100644 --- a/pkg/services/mocks/GexSender.go +++ b/pkg/services/mocks/GexSender.go @@ -18,6 +18,10 @@ type GexSender struct { func (_m *GexSender) SendToGex(channel services.GEXChannel, edi string, filename string) (*http.Response, error) { ret := _m.Called(channel, edi, filename) + if len(ret) == 0 { + panic("no return value specified for SendToGex") + } + var r0 *http.Response var r1 error if rf, ok := ret.Get(0).(func(services.GEXChannel, string, string) (*http.Response, error)); ok { diff --git a/pkg/services/mocks/LineOfAccountingFetcher.go b/pkg/services/mocks/LineOfAccountingFetcher.go index ba1c54de614..4c7c5b94b76 100644 --- a/pkg/services/mocks/LineOfAccountingFetcher.go +++ b/pkg/services/mocks/LineOfAccountingFetcher.go @@ -20,6 +20,10 @@ type LineOfAccountingFetcher struct { func (_m *LineOfAccountingFetcher) BuildFullLineOfAccountingString(loa models.LineOfAccounting) string { ret := _m.Called(loa) + if len(ret) == 0 { + panic("no return value specified for BuildFullLineOfAccountingString") + } + var r0 string if rf, ok := ret.Get(0).(func(models.LineOfAccounting) string); ok { r0 = rf(loa) @@ -34,6 +38,10 @@ func (_m *LineOfAccountingFetcher) BuildFullLineOfAccountingString(loa models.Li func (_m *LineOfAccountingFetcher) FetchLongLinesOfAccounting(serviceMemberAffiliation models.ServiceMemberAffiliation, ordersIssueDate time.Time, tacCode string, appCtx appcontext.AppContext) ([]models.LineOfAccounting, error) { ret := _m.Called(serviceMemberAffiliation, ordersIssueDate, tacCode, appCtx) + if len(ret) == 0 { + panic("no return value specified for FetchLongLinesOfAccounting") + } + var r0 []models.LineOfAccounting var r1 error if rf, ok := ret.Get(0).(func(models.ServiceMemberAffiliation, time.Time, string, appcontext.AppContext) ([]models.LineOfAccounting, error)); ok { diff --git a/pkg/services/mocks/ListFetcher.go b/pkg/services/mocks/ListFetcher.go index 2ee662c6496..91fd6f84eff 100644 --- a/pkg/services/mocks/ListFetcher.go +++ b/pkg/services/mocks/ListFetcher.go @@ -18,6 +18,10 @@ type ListFetcher struct { func (_m *ListFetcher) FetchRecordCount(appCtx appcontext.AppContext, model interface{}, filters []services.QueryFilter) (int, error) { ret := _m.Called(appCtx, model, filters) + if len(ret) == 0 { + panic("no return value specified for FetchRecordCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, interface{}, []services.QueryFilter) (int, error)); ok { @@ -42,6 +46,10 @@ func (_m *ListFetcher) FetchRecordCount(appCtx appcontext.AppContext, model inte func (_m *ListFetcher) FetchRecordList(appCtx appcontext.AppContext, model interface{}, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) error { ret := _m.Called(appCtx, model, filters, associations, pagination, ordering) + if len(ret) == 0 { + panic("no return value specified for FetchRecordList") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, interface{}, []services.QueryFilter, services.QueryAssociations, services.Pagination, services.QueryOrder) error); ok { r0 = rf(appCtx, model, filters, associations, pagination, ordering) diff --git a/pkg/services/mocks/MTOAgentCreator.go b/pkg/services/mocks/MTOAgentCreator.go index ff9dcaa9d7a..d55cbeab296 100644 --- a/pkg/services/mocks/MTOAgentCreator.go +++ b/pkg/services/mocks/MTOAgentCreator.go @@ -18,6 +18,10 @@ type MTOAgentCreator struct { func (_m *MTOAgentCreator) CreateMTOAgentPrime(appCtx appcontext.AppContext, mtoAgent *models.MTOAgent) (*models.MTOAgent, error) { ret := _m.Called(appCtx, mtoAgent) + if len(ret) == 0 { + panic("no return value specified for CreateMTOAgentPrime") + } + var r0 *models.MTOAgent var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOAgent) (*models.MTOAgent, error)); ok { diff --git a/pkg/services/mocks/MTOAgentUpdater.go b/pkg/services/mocks/MTOAgentUpdater.go index 131e7ecf285..ff4d2e85aea 100644 --- a/pkg/services/mocks/MTOAgentUpdater.go +++ b/pkg/services/mocks/MTOAgentUpdater.go @@ -18,6 +18,10 @@ type MTOAgentUpdater struct { func (_m *MTOAgentUpdater) UpdateMTOAgentBasic(appCtx appcontext.AppContext, mtoAgent *models.MTOAgent, eTag string) (*models.MTOAgent, error) { ret := _m.Called(appCtx, mtoAgent, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateMTOAgentBasic") + } + var r0 *models.MTOAgent var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOAgent, string) (*models.MTOAgent, error)); ok { @@ -44,6 +48,10 @@ func (_m *MTOAgentUpdater) UpdateMTOAgentBasic(appCtx appcontext.AppContext, mto func (_m *MTOAgentUpdater) UpdateMTOAgentPrime(appCtx appcontext.AppContext, mtoAgent *models.MTOAgent, eTag string) (*models.MTOAgent, error) { ret := _m.Called(appCtx, mtoAgent, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateMTOAgentPrime") + } + var r0 *models.MTOAgent var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOAgent, string) (*models.MTOAgent, error)); ok { diff --git a/pkg/services/mocks/MTOServiceItemCreator.go b/pkg/services/mocks/MTOServiceItemCreator.go index bb08fe42011..ae6e7d230e7 100644 --- a/pkg/services/mocks/MTOServiceItemCreator.go +++ b/pkg/services/mocks/MTOServiceItemCreator.go @@ -20,6 +20,10 @@ type MTOServiceItemCreator struct { func (_m *MTOServiceItemCreator) CreateMTOServiceItem(appCtx appcontext.AppContext, serviceItem *models.MTOServiceItem) (*models.MTOServiceItems, *validate.Errors, error) { ret := _m.Called(appCtx, serviceItem) + if len(ret) == 0 { + panic("no return value specified for CreateMTOServiceItem") + } + var r0 *models.MTOServiceItems var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/MTOServiceItemFetcher.go b/pkg/services/mocks/MTOServiceItemFetcher.go index 46cca47d53e..a681ad4c5eb 100644 --- a/pkg/services/mocks/MTOServiceItemFetcher.go +++ b/pkg/services/mocks/MTOServiceItemFetcher.go @@ -20,6 +20,10 @@ type MTOServiceItemFetcher struct { func (_m *MTOServiceItemFetcher) GetServiceItem(appCtx appcontext.AppContext, serviceItemID uuid.UUID) (*models.MTOServiceItem, error) { ret := _m.Called(appCtx, serviceItemID) + if len(ret) == 0 { + panic("no return value specified for GetServiceItem") + } + var r0 *models.MTOServiceItem var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.MTOServiceItem, error)); ok { diff --git a/pkg/services/mocks/MTOServiceItemUpdater.go b/pkg/services/mocks/MTOServiceItemUpdater.go index 9a23735d53b..ed356fd7699 100644 --- a/pkg/services/mocks/MTOServiceItemUpdater.go +++ b/pkg/services/mocks/MTOServiceItemUpdater.go @@ -22,6 +22,10 @@ type MTOServiceItemUpdater struct { func (_m *MTOServiceItemUpdater) ApproveOrRejectServiceItem(appCtx appcontext.AppContext, mtoServiceItemID uuid.UUID, status models.MTOServiceItemStatus, rejectionReason *string, eTag string) (*models.MTOServiceItem, error) { ret := _m.Called(appCtx, mtoServiceItemID, status, rejectionReason, eTag) + if len(ret) == 0 { + panic("no return value specified for ApproveOrRejectServiceItem") + } + var r0 *models.MTOServiceItem var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, models.MTOServiceItemStatus, *string, string) (*models.MTOServiceItem, error)); ok { @@ -48,6 +52,10 @@ func (_m *MTOServiceItemUpdater) ApproveOrRejectServiceItem(appCtx appcontext.Ap func (_m *MTOServiceItemUpdater) ConvertItemToCustomerExpense(appCtx appcontext.AppContext, shipment *models.MTOShipment, customerExpenseReason *string, convertToCustomerExpense bool) (*models.MTOServiceItem, error) { ret := _m.Called(appCtx, shipment, customerExpenseReason, convertToCustomerExpense) + if len(ret) == 0 { + panic("no return value specified for ConvertItemToCustomerExpense") + } + var r0 *models.MTOServiceItem var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment, *string, bool) (*models.MTOServiceItem, error)); ok { @@ -74,6 +82,10 @@ func (_m *MTOServiceItemUpdater) ConvertItemToCustomerExpense(appCtx appcontext. func (_m *MTOServiceItemUpdater) UpdateMTOServiceItem(appCtx appcontext.AppContext, serviceItem *models.MTOServiceItem, eTag string, validator string) (*models.MTOServiceItem, error) { ret := _m.Called(appCtx, serviceItem, eTag, validator) + if len(ret) == 0 { + panic("no return value specified for UpdateMTOServiceItem") + } + var r0 *models.MTOServiceItem var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOServiceItem, string, string) (*models.MTOServiceItem, error)); ok { @@ -100,6 +112,10 @@ func (_m *MTOServiceItemUpdater) UpdateMTOServiceItem(appCtx appcontext.AppConte func (_m *MTOServiceItemUpdater) UpdateMTOServiceItemBasic(appCtx appcontext.AppContext, serviceItem *models.MTOServiceItem, eTag string) (*models.MTOServiceItem, error) { ret := _m.Called(appCtx, serviceItem, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateMTOServiceItemBasic") + } + var r0 *models.MTOServiceItem var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOServiceItem, string) (*models.MTOServiceItem, error)); ok { @@ -126,6 +142,10 @@ func (_m *MTOServiceItemUpdater) UpdateMTOServiceItemBasic(appCtx appcontext.App func (_m *MTOServiceItemUpdater) UpdateMTOServiceItemPrime(appCtx appcontext.AppContext, serviceItem *models.MTOServiceItem, planner route.Planner, shipment models.MTOShipment, eTag string) (*models.MTOServiceItem, error) { ret := _m.Called(appCtx, serviceItem, planner, shipment, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateMTOServiceItemPrime") + } + var r0 *models.MTOServiceItem var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOServiceItem, route.Planner, models.MTOShipment, string) (*models.MTOServiceItem, error)); ok { diff --git a/pkg/services/mocks/MTOShipmentCreator.go b/pkg/services/mocks/MTOShipmentCreator.go index bc6e8c9d9aa..6ace698f993 100644 --- a/pkg/services/mocks/MTOShipmentCreator.go +++ b/pkg/services/mocks/MTOShipmentCreator.go @@ -18,6 +18,10 @@ type MTOShipmentCreator struct { func (_m *MTOShipmentCreator) CreateMTOShipment(appCtx appcontext.AppContext, MTOShipment *models.MTOShipment) (*models.MTOShipment, error) { ret := _m.Called(appCtx, MTOShipment) + if len(ret) == 0 { + panic("no return value specified for CreateMTOShipment") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/MTOShipmentFetcher.go b/pkg/services/mocks/MTOShipmentFetcher.go index d6559cb2481..ee463280ae3 100644 --- a/pkg/services/mocks/MTOShipmentFetcher.go +++ b/pkg/services/mocks/MTOShipmentFetcher.go @@ -20,6 +20,10 @@ type MTOShipmentFetcher struct { func (_m *MTOShipmentFetcher) GetDiversionChain(appCtx appcontext.AppContext, shipmentID uuid.UUID) (*[]models.MTOShipment, error) { ret := _m.Called(appCtx, shipmentID) + if len(ret) == 0 { + panic("no return value specified for GetDiversionChain") + } + var r0 *[]models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*[]models.MTOShipment, error)); ok { @@ -53,6 +57,10 @@ func (_m *MTOShipmentFetcher) GetShipment(appCtx appcontext.AppContext, shipment _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetShipment") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, ...string) (*models.MTOShipment, error)); ok { @@ -79,6 +87,10 @@ func (_m *MTOShipmentFetcher) GetShipment(appCtx appcontext.AppContext, shipment func (_m *MTOShipmentFetcher) ListMTOShipments(appCtx appcontext.AppContext, moveID uuid.UUID) ([]models.MTOShipment, error) { ret := _m.Called(appCtx, moveID) + if len(ret) == 0 { + panic("no return value specified for ListMTOShipments") + } + var r0 []models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) ([]models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/MTOShipmentStatusUpdater.go b/pkg/services/mocks/MTOShipmentStatusUpdater.go index 4578dd86591..59fe55ec473 100644 --- a/pkg/services/mocks/MTOShipmentStatusUpdater.go +++ b/pkg/services/mocks/MTOShipmentStatusUpdater.go @@ -20,6 +20,10 @@ type MTOShipmentStatusUpdater struct { func (_m *MTOShipmentStatusUpdater) UpdateMTOShipmentStatus(appCtx appcontext.AppContext, shipmentID uuid.UUID, status models.MTOShipmentStatus, rejectionReason *string, diversionReason *string, eTag string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipmentID, status, rejectionReason, diversionReason, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateMTOShipmentStatus") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, models.MTOShipmentStatus, *string, *string, string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/MTOShipmentUpdater.go b/pkg/services/mocks/MTOShipmentUpdater.go index 2b385559b6f..47f413b3578 100644 --- a/pkg/services/mocks/MTOShipmentUpdater.go +++ b/pkg/services/mocks/MTOShipmentUpdater.go @@ -20,6 +20,10 @@ type MTOShipmentUpdater struct { func (_m *MTOShipmentUpdater) MTOShipmentsMTOAvailableToPrime(appCtx appcontext.AppContext, mtoShipmentID uuid.UUID) (bool, error) { ret := _m.Called(appCtx, mtoShipmentID) + if len(ret) == 0 { + panic("no return value specified for MTOShipmentsMTOAvailableToPrime") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (bool, error)); ok { @@ -44,6 +48,10 @@ func (_m *MTOShipmentUpdater) MTOShipmentsMTOAvailableToPrime(appCtx appcontext. func (_m *MTOShipmentUpdater) UpdateMTOShipment(appCtx appcontext.AppContext, mtoShipment *models.MTOShipment, eTag string, api string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, mtoShipment, eTag, api) + if len(ret) == 0 { + panic("no return value specified for UpdateMTOShipment") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment, string, string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/ManagementServicesPricer.go b/pkg/services/mocks/ManagementServicesPricer.go index 4a832d51602..3cac867eee4 100644 --- a/pkg/services/mocks/ManagementServicesPricer.go +++ b/pkg/services/mocks/ManagementServicesPricer.go @@ -22,6 +22,10 @@ type ManagementServicesPricer struct { func (_m *ManagementServicesPricer) Price(appCtx appcontext.AppContext, lockedPriceCents *unit.Cents) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, lockedPriceCents) + if len(ret) == 0 { + panic("no return value specified for Price") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error @@ -55,6 +59,10 @@ func (_m *ManagementServicesPricer) Price(appCtx appcontext.AppContext, lockedPr func (_m *ManagementServicesPricer) PriceUsingParams(appCtx appcontext.AppContext, params models.PaymentServiceItemParams) (unit.Cents, services.PricingDisplayParams, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for PriceUsingParams") + } + var r0 unit.Cents var r1 services.PricingDisplayParams var r2 error diff --git a/pkg/services/mocks/MobileHomeShipmentCreator.go b/pkg/services/mocks/MobileHomeShipmentCreator.go index 9c8c11ea39a..51442268578 100644 --- a/pkg/services/mocks/MobileHomeShipmentCreator.go +++ b/pkg/services/mocks/MobileHomeShipmentCreator.go @@ -18,6 +18,10 @@ type MobileHomeShipmentCreator struct { func (_m *MobileHomeShipmentCreator) CreateMobileHomeShipmentWithDefaultCheck(appCtx appcontext.AppContext, mobileHomeshipment *models.MobileHome) (*models.MobileHome, error) { ret := _m.Called(appCtx, mobileHomeshipment) + if len(ret) == 0 { + panic("no return value specified for CreateMobileHomeShipmentWithDefaultCheck") + } + var r0 *models.MobileHome var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MobileHome) (*models.MobileHome, error)); ok { diff --git a/pkg/services/mocks/MobileHomeShipmentFetcher.go b/pkg/services/mocks/MobileHomeShipmentFetcher.go index 41839a63c48..d269e45ff1d 100644 --- a/pkg/services/mocks/MobileHomeShipmentFetcher.go +++ b/pkg/services/mocks/MobileHomeShipmentFetcher.go @@ -20,6 +20,10 @@ type MobileHomeShipmentFetcher struct { func (_m *MobileHomeShipmentFetcher) GetMobileHomeShipment(appCtx appcontext.AppContext, mobileHomeShipmentID uuid.UUID, eagerPreloadAssociations []string, postloadAssociations []string) (*models.MobileHome, error) { ret := _m.Called(appCtx, mobileHomeShipmentID, eagerPreloadAssociations, postloadAssociations) + if len(ret) == 0 { + panic("no return value specified for GetMobileHomeShipment") + } + var r0 *models.MobileHome var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, []string, []string) (*models.MobileHome, error)); ok { @@ -46,6 +50,10 @@ func (_m *MobileHomeShipmentFetcher) GetMobileHomeShipment(appCtx appcontext.App func (_m *MobileHomeShipmentFetcher) PostloadAssociations(appCtx appcontext.AppContext, mobileHomeShipment *models.MobileHome, postloadAssociations []string) error { ret := _m.Called(appCtx, mobileHomeShipment, postloadAssociations) + if len(ret) == 0 { + panic("no return value specified for PostloadAssociations") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MobileHome, []string) error); ok { r0 = rf(appCtx, mobileHomeShipment, postloadAssociations) diff --git a/pkg/services/mocks/MobileHomeShipmentUpdater.go b/pkg/services/mocks/MobileHomeShipmentUpdater.go index e6440a7e074..fd56bb6638c 100644 --- a/pkg/services/mocks/MobileHomeShipmentUpdater.go +++ b/pkg/services/mocks/MobileHomeShipmentUpdater.go @@ -20,6 +20,10 @@ type MobileHomeShipmentUpdater struct { func (_m *MobileHomeShipmentUpdater) UpdateMobileHomeShipmentWithDefaultCheck(appCtx appcontext.AppContext, mobileHomeshipment *models.MobileHome, mtoShipmentID uuid.UUID) (*models.MobileHome, error) { ret := _m.Called(appCtx, mobileHomeshipment, mtoShipmentID) + if len(ret) == 0 { + panic("no return value specified for UpdateMobileHomeShipmentWithDefaultCheck") + } + var r0 *models.MobileHome var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MobileHome, uuid.UUID) (*models.MobileHome, error)); ok { diff --git a/pkg/services/mocks/MoveExcessWeightUploader.go b/pkg/services/mocks/MoveExcessWeightUploader.go index 715bd4f1e04..9e95af741dd 100644 --- a/pkg/services/mocks/MoveExcessWeightUploader.go +++ b/pkg/services/mocks/MoveExcessWeightUploader.go @@ -23,6 +23,10 @@ type MoveExcessWeightUploader struct { func (_m *MoveExcessWeightUploader) CreateExcessWeightUpload(appCtx appcontext.AppContext, moveID uuid.UUID, file io.ReadCloser, uploadFilename string, uploadType models.UploadType) (*models.Move, error) { ret := _m.Called(appCtx, moveID, file, uploadFilename, uploadType) + if len(ret) == 0 { + panic("no return value specified for CreateExcessWeightUpload") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, io.ReadCloser, string, models.UploadType) (*models.Move, error)); ok { diff --git a/pkg/services/mocks/MoveFetcher.go b/pkg/services/mocks/MoveFetcher.go index f3f1155b0ee..22a26abbd68 100644 --- a/pkg/services/mocks/MoveFetcher.go +++ b/pkg/services/mocks/MoveFetcher.go @@ -20,6 +20,10 @@ type MoveFetcher struct { func (_m *MoveFetcher) FetchMove(appCtx appcontext.AppContext, locator string, searchParams *services.MoveFetcherParams) (*models.Move, error) { ret := _m.Called(appCtx, locator, searchParams) + if len(ret) == 0 { + panic("no return value specified for FetchMove") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, *services.MoveFetcherParams) (*models.Move, error)); ok { @@ -46,6 +50,10 @@ func (_m *MoveFetcher) FetchMove(appCtx appcontext.AppContext, locator string, s func (_m *MoveFetcher) FetchMovesForPPTASReports(appCtx appcontext.AppContext, params *services.MoveTaskOrderFetcherParams) (models.Moves, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for FetchMovesForPPTASReports") + } + var r0 models.Moves var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *services.MoveTaskOrderFetcherParams) (models.Moves, error)); ok { diff --git a/pkg/services/mocks/MoveFinancialReviewFlagSetter.go b/pkg/services/mocks/MoveFinancialReviewFlagSetter.go index b90137f6b68..e0eea4b3c92 100644 --- a/pkg/services/mocks/MoveFinancialReviewFlagSetter.go +++ b/pkg/services/mocks/MoveFinancialReviewFlagSetter.go @@ -20,6 +20,10 @@ type MoveFinancialReviewFlagSetter struct { func (_m *MoveFinancialReviewFlagSetter) SetFinancialReviewFlag(appCtx appcontext.AppContext, moveID uuid.UUID, eTag string, flagForReview bool, remarks *string) (*models.Move, error) { ret := _m.Called(appCtx, moveID, eTag, flagForReview, remarks) + if len(ret) == 0 { + panic("no return value specified for SetFinancialReviewFlag") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string, bool, *string) (*models.Move, error)); ok { diff --git a/pkg/services/mocks/MoveHistoryFetcher.go b/pkg/services/mocks/MoveHistoryFetcher.go index 60ee4b8a773..ce8e10a8558 100644 --- a/pkg/services/mocks/MoveHistoryFetcher.go +++ b/pkg/services/mocks/MoveHistoryFetcher.go @@ -20,6 +20,10 @@ type MoveHistoryFetcher struct { func (_m *MoveHistoryFetcher) FetchMoveHistory(appCtx appcontext.AppContext, params *services.FetchMoveHistoryParams) (*models.MoveHistory, int64, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for FetchMoveHistory") + } + var r0 *models.MoveHistory var r1 int64 var r2 error diff --git a/pkg/services/mocks/MoveListFetcher.go b/pkg/services/mocks/MoveListFetcher.go index d14e9e5731b..afacc823512 100644 --- a/pkg/services/mocks/MoveListFetcher.go +++ b/pkg/services/mocks/MoveListFetcher.go @@ -20,6 +20,10 @@ type MoveListFetcher struct { func (_m *MoveListFetcher) FetchMoveCount(appCtx appcontext.AppContext, filters []services.QueryFilter) (int, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchMoveCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (int, error)); ok { @@ -44,6 +48,10 @@ func (_m *MoveListFetcher) FetchMoveCount(appCtx appcontext.AppContext, filters func (_m *MoveListFetcher) FetchMoveList(appCtx appcontext.AppContext, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) (models.Moves, error) { ret := _m.Called(appCtx, filters, associations, pagination, ordering) + if len(ret) == 0 { + panic("no return value specified for FetchMoveList") + } + var r0 models.Moves var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter, services.QueryAssociations, services.Pagination, services.QueryOrder) (models.Moves, error)); ok { diff --git a/pkg/services/mocks/MoveLocker.go b/pkg/services/mocks/MoveLocker.go index ae8595e86a9..8fb3b719be8 100644 --- a/pkg/services/mocks/MoveLocker.go +++ b/pkg/services/mocks/MoveLocker.go @@ -20,6 +20,10 @@ type MoveLocker struct { func (_m *MoveLocker) LockMove(appCtx appcontext.AppContext, move *models.Move, officeUserID uuid.UUID) (*models.Move, error) { ret := _m.Called(appCtx, move, officeUserID) + if len(ret) == 0 { + panic("no return value specified for LockMove") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.Move, uuid.UUID) (*models.Move, error)); ok { diff --git a/pkg/services/mocks/MoveRouter.go b/pkg/services/mocks/MoveRouter.go index 4bdf4c96b67..7ba190007b6 100644 --- a/pkg/services/mocks/MoveRouter.go +++ b/pkg/services/mocks/MoveRouter.go @@ -18,6 +18,10 @@ type MoveRouter struct { func (_m *MoveRouter) Approve(appCtx appcontext.AppContext, move *models.Move) error { ret := _m.Called(appCtx, move) + if len(ret) == 0 { + panic("no return value specified for Approve") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.Move) error); ok { r0 = rf(appCtx, move) @@ -32,6 +36,10 @@ func (_m *MoveRouter) Approve(appCtx appcontext.AppContext, move *models.Move) e func (_m *MoveRouter) ApproveOrRequestApproval(appCtx appcontext.AppContext, move models.Move) (*models.Move, error) { ret := _m.Called(appCtx, move) + if len(ret) == 0 { + panic("no return value specified for ApproveOrRequestApproval") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.Move) (*models.Move, error)); ok { @@ -58,6 +66,10 @@ func (_m *MoveRouter) ApproveOrRequestApproval(appCtx appcontext.AppContext, mov func (_m *MoveRouter) Cancel(appCtx appcontext.AppContext, reason string, move *models.Move) error { ret := _m.Called(appCtx, reason, move) + if len(ret) == 0 { + panic("no return value specified for Cancel") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, *models.Move) error); ok { r0 = rf(appCtx, reason, move) @@ -72,6 +84,10 @@ func (_m *MoveRouter) Cancel(appCtx appcontext.AppContext, reason string, move * func (_m *MoveRouter) CompleteServiceCounseling(appCtx appcontext.AppContext, move *models.Move) error { ret := _m.Called(appCtx, move) + if len(ret) == 0 { + panic("no return value specified for CompleteServiceCounseling") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.Move) error); ok { r0 = rf(appCtx, move) @@ -86,6 +102,10 @@ func (_m *MoveRouter) CompleteServiceCounseling(appCtx appcontext.AppContext, mo func (_m *MoveRouter) RouteAfterAmendingOrders(appCtx appcontext.AppContext, move *models.Move) error { ret := _m.Called(appCtx, move) + if len(ret) == 0 { + panic("no return value specified for RouteAfterAmendingOrders") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.Move) error); ok { r0 = rf(appCtx, move) @@ -100,6 +120,10 @@ func (_m *MoveRouter) RouteAfterAmendingOrders(appCtx appcontext.AppContext, mov func (_m *MoveRouter) SendToOfficeUser(appCtx appcontext.AppContext, move *models.Move) error { ret := _m.Called(appCtx, move) + if len(ret) == 0 { + panic("no return value specified for SendToOfficeUser") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.Move) error); ok { r0 = rf(appCtx, move) @@ -114,6 +138,10 @@ func (_m *MoveRouter) SendToOfficeUser(appCtx appcontext.AppContext, move *model func (_m *MoveRouter) Submit(appCtx appcontext.AppContext, move *models.Move, newSignedCertification *models.SignedCertification) error { ret := _m.Called(appCtx, move, newSignedCertification) + if len(ret) == 0 { + panic("no return value specified for Submit") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.Move, *models.SignedCertification) error); ok { r0 = rf(appCtx, move, newSignedCertification) diff --git a/pkg/services/mocks/MoveSearcher.go b/pkg/services/mocks/MoveSearcher.go index 31093d7c29e..b1d75ef0ea0 100644 --- a/pkg/services/mocks/MoveSearcher.go +++ b/pkg/services/mocks/MoveSearcher.go @@ -20,6 +20,10 @@ type MoveSearcher struct { func (_m *MoveSearcher) SearchMoves(appCtx appcontext.AppContext, params *services.SearchMovesParams) (models.Moves, int, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for SearchMoves") + } + var r0 models.Moves var r1 int var r2 error diff --git a/pkg/services/mocks/MoveTaskOrderChecker.go b/pkg/services/mocks/MoveTaskOrderChecker.go index 58d7a3ad20b..fbf168a55f4 100644 --- a/pkg/services/mocks/MoveTaskOrderChecker.go +++ b/pkg/services/mocks/MoveTaskOrderChecker.go @@ -18,6 +18,10 @@ type MoveTaskOrderChecker struct { func (_m *MoveTaskOrderChecker) MTOAvailableToPrime(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID) (bool, error) { ret := _m.Called(appCtx, moveTaskOrderID) + if len(ret) == 0 { + panic("no return value specified for MTOAvailableToPrime") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (bool, error)); ok { diff --git a/pkg/services/mocks/MoveTaskOrderCreator.go b/pkg/services/mocks/MoveTaskOrderCreator.go index b0394ceb7f9..663a72ff251 100644 --- a/pkg/services/mocks/MoveTaskOrderCreator.go +++ b/pkg/services/mocks/MoveTaskOrderCreator.go @@ -20,6 +20,10 @@ type MoveTaskOrderCreator struct { func (_m *MoveTaskOrderCreator) CreateMoveTaskOrder(appCtx appcontext.AppContext, moveTaskOrder *models.Move) (*models.Move, *validate.Errors, error) { ret := _m.Called(appCtx, moveTaskOrder) + if len(ret) == 0 { + panic("no return value specified for CreateMoveTaskOrder") + } + var r0 *models.Move var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/MoveTaskOrderFetcher.go b/pkg/services/mocks/MoveTaskOrderFetcher.go index 435f00a21bf..d3e4a26610c 100644 --- a/pkg/services/mocks/MoveTaskOrderFetcher.go +++ b/pkg/services/mocks/MoveTaskOrderFetcher.go @@ -20,6 +20,10 @@ type MoveTaskOrderFetcher struct { func (_m *MoveTaskOrderFetcher) FetchMoveTaskOrder(appCtx appcontext.AppContext, searchParams *services.MoveTaskOrderFetcherParams) (*models.Move, error) { ret := _m.Called(appCtx, searchParams) + if len(ret) == 0 { + panic("no return value specified for FetchMoveTaskOrder") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *services.MoveTaskOrderFetcherParams) (*models.Move, error)); ok { @@ -53,6 +57,10 @@ func (_m *MoveTaskOrderFetcher) GetMove(appCtx appcontext.AppContext, searchPara _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetMove") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *services.MoveTaskOrderFetcherParams, ...string) (*models.Move, error)); ok { @@ -79,6 +87,10 @@ func (_m *MoveTaskOrderFetcher) GetMove(appCtx appcontext.AppContext, searchPara func (_m *MoveTaskOrderFetcher) ListAllMoveTaskOrders(appCtx appcontext.AppContext, searchParams *services.MoveTaskOrderFetcherParams) (models.Moves, error) { ret := _m.Called(appCtx, searchParams) + if len(ret) == 0 { + panic("no return value specified for ListAllMoveTaskOrders") + } + var r0 models.Moves var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *services.MoveTaskOrderFetcherParams) (models.Moves, error)); ok { @@ -105,6 +117,10 @@ func (_m *MoveTaskOrderFetcher) ListAllMoveTaskOrders(appCtx appcontext.AppConte func (_m *MoveTaskOrderFetcher) ListNewPrimeMoveTaskOrders(appCtx appcontext.AppContext, searchParams *services.MoveTaskOrderFetcherParams) (models.Moves, int, error) { ret := _m.Called(appCtx, searchParams) + if len(ret) == 0 { + panic("no return value specified for ListNewPrimeMoveTaskOrders") + } + var r0 models.Moves var r1 int var r2 error @@ -138,6 +154,10 @@ func (_m *MoveTaskOrderFetcher) ListNewPrimeMoveTaskOrders(appCtx appcontext.App func (_m *MoveTaskOrderFetcher) ListPrimeMoveTaskOrders(appCtx appcontext.AppContext, searchParams *services.MoveTaskOrderFetcherParams) (models.Moves, error) { ret := _m.Called(appCtx, searchParams) + if len(ret) == 0 { + panic("no return value specified for ListPrimeMoveTaskOrders") + } + var r0 models.Moves var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *services.MoveTaskOrderFetcherParams) (models.Moves, error)); ok { @@ -164,6 +184,10 @@ func (_m *MoveTaskOrderFetcher) ListPrimeMoveTaskOrders(appCtx appcontext.AppCon func (_m *MoveTaskOrderFetcher) ListPrimeMoveTaskOrdersAmendments(appCtx appcontext.AppContext, searchParams *services.MoveTaskOrderFetcherParams) (models.Moves, services.MoveOrderAmendmentAvailableSinceCounts, error) { ret := _m.Called(appCtx, searchParams) + if len(ret) == 0 { + panic("no return value specified for ListPrimeMoveTaskOrdersAmendments") + } + var r0 models.Moves var r1 services.MoveOrderAmendmentAvailableSinceCounts var r2 error diff --git a/pkg/services/mocks/MoveTaskOrderHider.go b/pkg/services/mocks/MoveTaskOrderHider.go index 139ed418ea1..9a03874b9d6 100644 --- a/pkg/services/mocks/MoveTaskOrderHider.go +++ b/pkg/services/mocks/MoveTaskOrderHider.go @@ -18,6 +18,10 @@ type MoveTaskOrderHider struct { func (_m *MoveTaskOrderHider) Hide(appCtx appcontext.AppContext) (services.HiddenMoves, error) { ret := _m.Called(appCtx) + if len(ret) == 0 { + panic("no return value specified for Hide") + } + var r0 services.HiddenMoves var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext) (services.HiddenMoves, error)); ok { diff --git a/pkg/services/mocks/MoveTaskOrderUpdater.go b/pkg/services/mocks/MoveTaskOrderUpdater.go index f21ce26a8d6..8eeaa09fcf3 100644 --- a/pkg/services/mocks/MoveTaskOrderUpdater.go +++ b/pkg/services/mocks/MoveTaskOrderUpdater.go @@ -20,6 +20,10 @@ type MoveTaskOrderUpdater struct { func (_m *MoveTaskOrderUpdater) MakeAvailableToPrime(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string, includeServiceCodeMS bool, includeServiceCodeCS bool) (*models.Move, error) { ret := _m.Called(appCtx, moveTaskOrderID, eTag, includeServiceCodeMS, includeServiceCodeCS) + if len(ret) == 0 { + panic("no return value specified for MakeAvailableToPrime") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string, bool, bool) (*models.Move, error)); ok { @@ -46,6 +50,10 @@ func (_m *MoveTaskOrderUpdater) MakeAvailableToPrime(appCtx appcontext.AppContex func (_m *MoveTaskOrderUpdater) ShowHide(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, show *bool) (*models.Move, error) { ret := _m.Called(appCtx, moveTaskOrderID, show) + if len(ret) == 0 { + panic("no return value specified for ShowHide") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, *bool) (*models.Move, error)); ok { @@ -72,6 +80,10 @@ func (_m *MoveTaskOrderUpdater) ShowHide(appCtx appcontext.AppContext, moveTaskO func (_m *MoveTaskOrderUpdater) UpdatePPMType(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID) (*models.Move, error) { ret := _m.Called(appCtx, moveTaskOrderID) + if len(ret) == 0 { + panic("no return value specified for UpdatePPMType") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.Move, error)); ok { @@ -98,6 +110,10 @@ func (_m *MoveTaskOrderUpdater) UpdatePPMType(appCtx appcontext.AppContext, move func (_m *MoveTaskOrderUpdater) UpdatePostCounselingInfo(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string) (*models.Move, error) { ret := _m.Called(appCtx, moveTaskOrderID, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdatePostCounselingInfo") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string) (*models.Move, error)); ok { @@ -124,6 +140,10 @@ func (_m *MoveTaskOrderUpdater) UpdatePostCounselingInfo(appCtx appcontext.AppCo func (_m *MoveTaskOrderUpdater) UpdateReviewedBillableWeightsAt(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string) (*models.Move, error) { ret := _m.Called(appCtx, moveTaskOrderID, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateReviewedBillableWeightsAt") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string) (*models.Move, error)); ok { @@ -150,6 +170,10 @@ func (_m *MoveTaskOrderUpdater) UpdateReviewedBillableWeightsAt(appCtx appcontex func (_m *MoveTaskOrderUpdater) UpdateStatusServiceCounselingCompleted(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string) (*models.Move, error) { ret := _m.Called(appCtx, moveTaskOrderID, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusServiceCounselingCompleted") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string) (*models.Move, error)); ok { @@ -176,6 +200,10 @@ func (_m *MoveTaskOrderUpdater) UpdateStatusServiceCounselingCompleted(appCtx ap func (_m *MoveTaskOrderUpdater) UpdateTIORemarks(appCtx appcontext.AppContext, moveTaskOrderID uuid.UUID, eTag string, remarks string) (*models.Move, error) { ret := _m.Called(appCtx, moveTaskOrderID, eTag, remarks) + if len(ret) == 0 { + panic("no return value specified for UpdateTIORemarks") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string, string) (*models.Move, error)); ok { diff --git a/pkg/services/mocks/MoveUnlocker.go b/pkg/services/mocks/MoveUnlocker.go index a9088532e3e..3e1e8dab45f 100644 --- a/pkg/services/mocks/MoveUnlocker.go +++ b/pkg/services/mocks/MoveUnlocker.go @@ -20,6 +20,10 @@ type MoveUnlocker struct { func (_m *MoveUnlocker) CheckForLockedMovesAndUnlock(appCtx appcontext.AppContext, officeUserID uuid.UUID) error { ret := _m.Called(appCtx, officeUserID) + if len(ret) == 0 { + panic("no return value specified for CheckForLockedMovesAndUnlock") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) error); ok { r0 = rf(appCtx, officeUserID) @@ -34,6 +38,10 @@ func (_m *MoveUnlocker) CheckForLockedMovesAndUnlock(appCtx appcontext.AppContex func (_m *MoveUnlocker) UnlockMove(appCtx appcontext.AppContext, move *models.Move, officeUserID uuid.UUID) (*models.Move, error) { ret := _m.Called(appCtx, move, officeUserID) + if len(ret) == 0 { + panic("no return value specified for UnlockMove") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.Move, uuid.UUID) (*models.Move, error)); ok { diff --git a/pkg/services/mocks/MoveWeights.go b/pkg/services/mocks/MoveWeights.go index 8915fb90054..777c03e993c 100644 --- a/pkg/services/mocks/MoveWeights.go +++ b/pkg/services/mocks/MoveWeights.go @@ -22,6 +22,10 @@ type MoveWeights struct { func (_m *MoveWeights) CheckAutoReweigh(appCtx appcontext.AppContext, moveID uuid.UUID, updatedShipment *models.MTOShipment) (models.MTOShipments, error) { ret := _m.Called(appCtx, moveID, updatedShipment) + if len(ret) == 0 { + panic("no return value specified for CheckAutoReweigh") + } + var r0 models.MTOShipments var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, *models.MTOShipment) (models.MTOShipments, error)); ok { @@ -48,6 +52,10 @@ func (_m *MoveWeights) CheckAutoReweigh(appCtx appcontext.AppContext, moveID uui func (_m *MoveWeights) CheckExcessWeight(appCtx appcontext.AppContext, moveID uuid.UUID, updatedShipment models.MTOShipment) (*models.Move, *validate.Errors, error) { ret := _m.Called(appCtx, moveID, updatedShipment) + if len(ret) == 0 { + panic("no return value specified for CheckExcessWeight") + } + var r0 *models.Move var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/MovingExpenseCreator.go b/pkg/services/mocks/MovingExpenseCreator.go index 85e23c4bf2c..2d46df77d36 100644 --- a/pkg/services/mocks/MovingExpenseCreator.go +++ b/pkg/services/mocks/MovingExpenseCreator.go @@ -20,6 +20,10 @@ type MovingExpenseCreator struct { func (_m *MovingExpenseCreator) CreateMovingExpense(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.MovingExpense, error) { ret := _m.Called(appCtx, ppmShipmentID) + if len(ret) == 0 { + panic("no return value specified for CreateMovingExpense") + } + var r0 *models.MovingExpense var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.MovingExpense, error)); ok { diff --git a/pkg/services/mocks/MovingExpenseDeleter.go b/pkg/services/mocks/MovingExpenseDeleter.go index c1d0bb16fb4..a214a3b688b 100644 --- a/pkg/services/mocks/MovingExpenseDeleter.go +++ b/pkg/services/mocks/MovingExpenseDeleter.go @@ -18,6 +18,10 @@ type MovingExpenseDeleter struct { func (_m *MovingExpenseDeleter) DeleteMovingExpense(appCtx appcontext.AppContext, ppmID uuid.UUID, movingExpenseID uuid.UUID) error { ret := _m.Called(appCtx, ppmID, movingExpenseID) + if len(ret) == 0 { + panic("no return value specified for DeleteMovingExpense") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, uuid.UUID) error); ok { r0 = rf(appCtx, ppmID, movingExpenseID) diff --git a/pkg/services/mocks/MovingExpenseUpdater.go b/pkg/services/mocks/MovingExpenseUpdater.go index b0baffeb480..0caf792cfc6 100644 --- a/pkg/services/mocks/MovingExpenseUpdater.go +++ b/pkg/services/mocks/MovingExpenseUpdater.go @@ -18,6 +18,10 @@ type MovingExpenseUpdater struct { func (_m *MovingExpenseUpdater) UpdateMovingExpense(appCtx appcontext.AppContext, movingExpense models.MovingExpense, eTag string) (*models.MovingExpense, error) { ret := _m.Called(appCtx, movingExpense, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateMovingExpense") + } + var r0 *models.MovingExpense var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.MovingExpense, string) (*models.MovingExpense, error)); ok { diff --git a/pkg/services/mocks/OfficeListFetcher.go b/pkg/services/mocks/OfficeListFetcher.go index d3d8c47417b..42ddc27fe95 100644 --- a/pkg/services/mocks/OfficeListFetcher.go +++ b/pkg/services/mocks/OfficeListFetcher.go @@ -20,6 +20,10 @@ type OfficeListFetcher struct { func (_m *OfficeListFetcher) FetchOfficeCount(appCtx appcontext.AppContext, filters []services.QueryFilter) (int, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchOfficeCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (int, error)); ok { @@ -44,6 +48,10 @@ func (_m *OfficeListFetcher) FetchOfficeCount(appCtx appcontext.AppContext, filt func (_m *OfficeListFetcher) FetchOfficeList(appCtx appcontext.AppContext, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) (models.TransportationOffices, error) { ret := _m.Called(appCtx, filters, associations, pagination, ordering) + if len(ret) == 0 { + panic("no return value specified for FetchOfficeList") + } + var r0 models.TransportationOffices var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter, services.QueryAssociations, services.Pagination, services.QueryOrder) (models.TransportationOffices, error)); ok { diff --git a/pkg/services/mocks/OfficeUserCreator.go b/pkg/services/mocks/OfficeUserCreator.go index abdd93cb2e2..e0532ad9602 100644 --- a/pkg/services/mocks/OfficeUserCreator.go +++ b/pkg/services/mocks/OfficeUserCreator.go @@ -22,6 +22,10 @@ type OfficeUserCreator struct { func (_m *OfficeUserCreator) CreateOfficeUser(appCtx appcontext.AppContext, user *models.OfficeUser, transportationIDFilter []services.QueryFilter) (*models.OfficeUser, *validate.Errors, error) { ret := _m.Called(appCtx, user, transportationIDFilter) + if len(ret) == 0 { + panic("no return value specified for CreateOfficeUser") + } + var r0 *models.OfficeUser var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/OfficeUserFetcher.go b/pkg/services/mocks/OfficeUserFetcher.go index 92c7b0d16f2..111b5b9e536 100644 --- a/pkg/services/mocks/OfficeUserFetcher.go +++ b/pkg/services/mocks/OfficeUserFetcher.go @@ -20,6 +20,10 @@ type OfficeUserFetcher struct { func (_m *OfficeUserFetcher) FetchOfficeUser(appCtx appcontext.AppContext, filters []services.QueryFilter) (models.OfficeUser, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchOfficeUser") + } + var r0 models.OfficeUser var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (models.OfficeUser, error)); ok { diff --git a/pkg/services/mocks/OfficeUserFetcherPop.go b/pkg/services/mocks/OfficeUserFetcherPop.go index 3b167d49ef0..6a5a414d7f0 100644 --- a/pkg/services/mocks/OfficeUserFetcherPop.go +++ b/pkg/services/mocks/OfficeUserFetcherPop.go @@ -22,6 +22,10 @@ type OfficeUserFetcherPop struct { func (_m *OfficeUserFetcherPop) FetchOfficeUserByID(appCtx appcontext.AppContext, id uuid.UUID) (models.OfficeUser, error) { ret := _m.Called(appCtx, id) + if len(ret) == 0 { + panic("no return value specified for FetchOfficeUserByID") + } + var r0 models.OfficeUser var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (models.OfficeUser, error)); ok { @@ -46,6 +50,10 @@ func (_m *OfficeUserFetcherPop) FetchOfficeUserByID(appCtx appcontext.AppContext func (_m *OfficeUserFetcherPop) FetchOfficeUsersByRoleAndOffice(appCtx appcontext.AppContext, role roles.RoleType, officeID uuid.UUID) ([]models.OfficeUser, error) { ret := _m.Called(appCtx, role, officeID) + if len(ret) == 0 { + panic("no return value specified for FetchOfficeUsersByRoleAndOffice") + } + var r0 []models.OfficeUser var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, roles.RoleType, uuid.UUID) ([]models.OfficeUser, error)); ok { diff --git a/pkg/services/mocks/OfficeUserGblocFetcher.go b/pkg/services/mocks/OfficeUserGblocFetcher.go index 3d797ddcd39..e00a1a75242 100644 --- a/pkg/services/mocks/OfficeUserGblocFetcher.go +++ b/pkg/services/mocks/OfficeUserGblocFetcher.go @@ -18,6 +18,10 @@ type OfficeUserGblocFetcher struct { func (_m *OfficeUserGblocFetcher) FetchGblocForOfficeUser(appCtx appcontext.AppContext, id uuid.UUID) (string, error) { ret := _m.Called(appCtx, id) + if len(ret) == 0 { + panic("no return value specified for FetchGblocForOfficeUser") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (string, error)); ok { diff --git a/pkg/services/mocks/OfficeUserUpdater.go b/pkg/services/mocks/OfficeUserUpdater.go index c65446da2f8..bc236493d27 100644 --- a/pkg/services/mocks/OfficeUserUpdater.go +++ b/pkg/services/mocks/OfficeUserUpdater.go @@ -24,6 +24,10 @@ type OfficeUserUpdater struct { func (_m *OfficeUserUpdater) UpdateOfficeUser(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.OfficeUserUpdate) (*models.OfficeUser, *validate.Errors, error) { ret := _m.Called(appCtx, id, payload) + if len(ret) == 0 { + panic("no return value specified for UpdateOfficeUser") + } + var r0 *models.OfficeUser var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/OrderFetcher.go b/pkg/services/mocks/OrderFetcher.go index 19362c5b4db..a09769e816a 100644 --- a/pkg/services/mocks/OrderFetcher.go +++ b/pkg/services/mocks/OrderFetcher.go @@ -22,6 +22,10 @@ type OrderFetcher struct { func (_m *OrderFetcher) FetchOrder(appCtx appcontext.AppContext, orderID uuid.UUID) (*models.Order, error) { ret := _m.Called(appCtx, orderID) + if len(ret) == 0 { + panic("no return value specified for FetchOrder") + } + var r0 *models.Order var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.Order, error)); ok { @@ -48,6 +52,10 @@ func (_m *OrderFetcher) FetchOrder(appCtx appcontext.AppContext, orderID uuid.UU func (_m *OrderFetcher) ListAllOrderLocations(appCtx appcontext.AppContext, officeUserID uuid.UUID, params *services.ListOrderParams) ([]models.Move, error) { ret := _m.Called(appCtx, officeUserID, params) + if len(ret) == 0 { + panic("no return value specified for ListAllOrderLocations") + } + var r0 []models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, *services.ListOrderParams) ([]models.Move, error)); ok { @@ -74,6 +82,10 @@ func (_m *OrderFetcher) ListAllOrderLocations(appCtx appcontext.AppContext, offi func (_m *OrderFetcher) ListOrders(appCtx appcontext.AppContext, officeUserID uuid.UUID, params *services.ListOrderParams) ([]models.Move, int, error) { ret := _m.Called(appCtx, officeUserID, params) + if len(ret) == 0 { + panic("no return value specified for ListOrders") + } + var r0 []models.Move var r1 int var r2 error diff --git a/pkg/services/mocks/OrderUpdater.go b/pkg/services/mocks/OrderUpdater.go index 71ca4204817..44a62f07ab3 100644 --- a/pkg/services/mocks/OrderUpdater.go +++ b/pkg/services/mocks/OrderUpdater.go @@ -28,6 +28,10 @@ type OrderUpdater struct { func (_m *OrderUpdater) UpdateAllowanceAsCounselor(appCtx appcontext.AppContext, orderID uuid.UUID, payload ghcmessages.CounselingUpdateAllowancePayload, eTag string) (*models.Order, uuid.UUID, error) { ret := _m.Called(appCtx, orderID, payload, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateAllowanceAsCounselor") + } + var r0 *models.Order var r1 uuid.UUID var r2 error @@ -63,6 +67,10 @@ func (_m *OrderUpdater) UpdateAllowanceAsCounselor(appCtx appcontext.AppContext, func (_m *OrderUpdater) UpdateAllowanceAsTOO(appCtx appcontext.AppContext, orderID uuid.UUID, payload ghcmessages.UpdateAllowancePayload, eTag string) (*models.Order, uuid.UUID, error) { ret := _m.Called(appCtx, orderID, payload, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateAllowanceAsTOO") + } + var r0 *models.Order var r1 uuid.UUID var r2 error @@ -98,6 +106,10 @@ func (_m *OrderUpdater) UpdateAllowanceAsTOO(appCtx appcontext.AppContext, order func (_m *OrderUpdater) UpdateOrderAsCounselor(appCtx appcontext.AppContext, orderID uuid.UUID, payload ghcmessages.CounselingUpdateOrderPayload, eTag string) (*models.Order, uuid.UUID, error) { ret := _m.Called(appCtx, orderID, payload, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateOrderAsCounselor") + } + var r0 *models.Order var r1 uuid.UUID var r2 error @@ -133,6 +145,10 @@ func (_m *OrderUpdater) UpdateOrderAsCounselor(appCtx appcontext.AppContext, ord func (_m *OrderUpdater) UpdateOrderAsTOO(appCtx appcontext.AppContext, orderID uuid.UUID, payload ghcmessages.UpdateOrderPayload, eTag string) (*models.Order, uuid.UUID, error) { ret := _m.Called(appCtx, orderID, payload, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateOrderAsTOO") + } + var r0 *models.Order var r1 uuid.UUID var r2 error @@ -168,6 +184,10 @@ func (_m *OrderUpdater) UpdateOrderAsTOO(appCtx appcontext.AppContext, orderID u func (_m *OrderUpdater) UploadAmendedOrdersAsCustomer(appCtx appcontext.AppContext, userID uuid.UUID, orderID uuid.UUID, file io.ReadCloser, filename string, storer storage.FileStorer) (models.Upload, string, *validate.Errors, error) { ret := _m.Called(appCtx, userID, orderID, file, filename, storer) + if len(ret) == 0 { + panic("no return value specified for UploadAmendedOrdersAsCustomer") + } + var r0 models.Upload var r1 string var r2 *validate.Errors @@ -208,6 +228,10 @@ func (_m *OrderUpdater) UploadAmendedOrdersAsCustomer(appCtx appcontext.AppConte func (_m *OrderUpdater) UploadAmendedOrdersAsOffice(appCtx appcontext.AppContext, userID uuid.UUID, orderID uuid.UUID, file io.ReadCloser, filename string, storer storage.FileStorer) (models.Upload, string, *validate.Errors, error) { ret := _m.Called(appCtx, userID, orderID, file, filename, storer) + if len(ret) == 0 { + panic("no return value specified for UploadAmendedOrdersAsOffice") + } + var r0 models.Upload var r1 string var r2 *validate.Errors diff --git a/pkg/services/mocks/OrganizationListFetcher.go b/pkg/services/mocks/OrganizationListFetcher.go index 7655e942397..d9ff1b6e61a 100644 --- a/pkg/services/mocks/OrganizationListFetcher.go +++ b/pkg/services/mocks/OrganizationListFetcher.go @@ -20,6 +20,10 @@ type OrganizationListFetcher struct { func (_m *OrganizationListFetcher) FetchOrganizationCount(appCtx appcontext.AppContext, filters []services.QueryFilter) (int, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchOrganizationCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (int, error)); ok { @@ -44,6 +48,10 @@ func (_m *OrganizationListFetcher) FetchOrganizationCount(appCtx appcontext.AppC func (_m *OrganizationListFetcher) FetchOrganizationList(appCtx appcontext.AppContext, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) (models.Organizations, error) { ret := _m.Called(appCtx, filters, associations, pagination, ordering) + if len(ret) == 0 { + panic("no return value specified for FetchOrganizationList") + } + var r0 models.Organizations var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter, services.QueryAssociations, services.Pagination, services.QueryOrder) (models.Organizations, error)); ok { diff --git a/pkg/services/mocks/PDFMerger.go b/pkg/services/mocks/PDFMerger.go index 901066a9fc4..132c2c8c848 100644 --- a/pkg/services/mocks/PDFMerger.go +++ b/pkg/services/mocks/PDFMerger.go @@ -19,6 +19,10 @@ type PDFMerger struct { func (_m *PDFMerger) MergePDFs(appCtx appcontext.AppContext, pdfsToMerge []io.ReadCloser) (io.ReadCloser, error) { ret := _m.Called(appCtx, pdfsToMerge) + if len(ret) == 0 { + panic("no return value specified for MergePDFs") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []io.ReadCloser) (io.ReadCloser, error)); ok { diff --git a/pkg/services/mocks/PPMCloseoutFetcher.go b/pkg/services/mocks/PPMCloseoutFetcher.go index fdf963591ec..70b047a90d7 100644 --- a/pkg/services/mocks/PPMCloseoutFetcher.go +++ b/pkg/services/mocks/PPMCloseoutFetcher.go @@ -22,6 +22,10 @@ type PPMCloseoutFetcher struct { func (_m *PPMCloseoutFetcher) GetActualWeight(ppmShipment *models.PPMShipment) (unit.Pound, error) { ret := _m.Called(ppmShipment) + if len(ret) == 0 { + panic("no return value specified for GetActualWeight") + } + var r0 unit.Pound var r1 error if rf, ok := ret.Get(0).(func(*models.PPMShipment) (unit.Pound, error)); ok { @@ -46,6 +50,10 @@ func (_m *PPMCloseoutFetcher) GetActualWeight(ppmShipment *models.PPMShipment) ( func (_m *PPMCloseoutFetcher) GetPPMCloseout(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.PPMCloseout, error) { ret := _m.Called(appCtx, ppmShipmentID) + if len(ret) == 0 { + panic("no return value specified for GetPPMCloseout") + } + var r0 *models.PPMCloseout var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.PPMCloseout, error)); ok { diff --git a/pkg/services/mocks/PPMDocumentFetcher.go b/pkg/services/mocks/PPMDocumentFetcher.go index 40f35119042..b16293a49de 100644 --- a/pkg/services/mocks/PPMDocumentFetcher.go +++ b/pkg/services/mocks/PPMDocumentFetcher.go @@ -20,6 +20,10 @@ type PPMDocumentFetcher struct { func (_m *PPMDocumentFetcher) GetPPMDocuments(appCtx appcontext.AppContext, mtoShipmentID uuid.UUID) (*models.PPMDocuments, error) { ret := _m.Called(appCtx, mtoShipmentID) + if len(ret) == 0 { + panic("no return value specified for GetPPMDocuments") + } + var r0 *models.PPMDocuments var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.PPMDocuments, error)); ok { diff --git a/pkg/services/mocks/PPMEstimator.go b/pkg/services/mocks/PPMEstimator.go index 1238fb0c816..3fb92aeb48c 100644 --- a/pkg/services/mocks/PPMEstimator.go +++ b/pkg/services/mocks/PPMEstimator.go @@ -20,6 +20,10 @@ type PPMEstimator struct { func (_m *PPMEstimator) CalculatePPMSITEstimatedCost(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) (*unit.Cents, error) { ret := _m.Called(appCtx, ppmShipment) + if len(ret) == 0 { + panic("no return value specified for CalculatePPMSITEstimatedCost") + } + var r0 *unit.Cents var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment) (*unit.Cents, error)); ok { @@ -46,6 +50,10 @@ func (_m *PPMEstimator) CalculatePPMSITEstimatedCost(appCtx appcontext.AppContex func (_m *PPMEstimator) CalculatePPMSITEstimatedCostBreakdown(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) (*models.PPMSITEstimatedCostInfo, error) { ret := _m.Called(appCtx, ppmShipment) + if len(ret) == 0 { + panic("no return value specified for CalculatePPMSITEstimatedCostBreakdown") + } + var r0 *models.PPMSITEstimatedCostInfo var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment) (*models.PPMSITEstimatedCostInfo, error)); ok { @@ -72,6 +80,10 @@ func (_m *PPMEstimator) CalculatePPMSITEstimatedCostBreakdown(appCtx appcontext. func (_m *PPMEstimator) EstimateIncentiveWithDefaultChecks(appCtx appcontext.AppContext, oldPPMShipment models.PPMShipment, newPPMShipment *models.PPMShipment) (*unit.Cents, *unit.Cents, error) { ret := _m.Called(appCtx, oldPPMShipment, newPPMShipment) + if len(ret) == 0 { + panic("no return value specified for EstimateIncentiveWithDefaultChecks") + } + var r0 *unit.Cents var r1 *unit.Cents var r2 error @@ -107,6 +119,10 @@ func (_m *PPMEstimator) EstimateIncentiveWithDefaultChecks(appCtx appcontext.App func (_m *PPMEstimator) FinalIncentiveWithDefaultChecks(appCtx appcontext.AppContext, oldPPMShipment models.PPMShipment, newPPMShipment *models.PPMShipment) (*unit.Cents, error) { ret := _m.Called(appCtx, oldPPMShipment, newPPMShipment) + if len(ret) == 0 { + panic("no return value specified for FinalIncentiveWithDefaultChecks") + } + var r0 *unit.Cents var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.PPMShipment, *models.PPMShipment) (*unit.Cents, error)); ok { @@ -133,6 +149,10 @@ func (_m *PPMEstimator) FinalIncentiveWithDefaultChecks(appCtx appcontext.AppCon func (_m *PPMEstimator) PriceBreakdown(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) (unit.Cents, unit.Cents, unit.Cents, unit.Cents, unit.Cents, unit.Cents, unit.Cents, error) { ret := _m.Called(appCtx, ppmShipment) + if len(ret) == 0 { + panic("no return value specified for PriceBreakdown") + } + var r0 unit.Cents var r1 unit.Cents var r2 unit.Cents diff --git a/pkg/services/mocks/PPMShipmentCreator.go b/pkg/services/mocks/PPMShipmentCreator.go index 9bcaede1f1e..ca00bc47838 100644 --- a/pkg/services/mocks/PPMShipmentCreator.go +++ b/pkg/services/mocks/PPMShipmentCreator.go @@ -18,6 +18,10 @@ type PPMShipmentCreator struct { func (_m *PPMShipmentCreator) CreatePPMShipmentWithDefaultCheck(appCtx appcontext.AppContext, ppmshipment *models.PPMShipment) (*models.PPMShipment, error) { ret := _m.Called(appCtx, ppmshipment) + if len(ret) == 0 { + panic("no return value specified for CreatePPMShipmentWithDefaultCheck") + } + var r0 *models.PPMShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment) (*models.PPMShipment, error)); ok { diff --git a/pkg/services/mocks/PPMShipmentFetcher.go b/pkg/services/mocks/PPMShipmentFetcher.go index b42acce817e..dd4339f7bd0 100644 --- a/pkg/services/mocks/PPMShipmentFetcher.go +++ b/pkg/services/mocks/PPMShipmentFetcher.go @@ -20,6 +20,10 @@ type PPMShipmentFetcher struct { func (_m *PPMShipmentFetcher) GetPPMShipment(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, eagerPreloadAssociations []string, postloadAssociations []string) (*models.PPMShipment, error) { ret := _m.Called(appCtx, ppmShipmentID, eagerPreloadAssociations, postloadAssociations) + if len(ret) == 0 { + panic("no return value specified for GetPPMShipment") + } + var r0 *models.PPMShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, []string, []string) (*models.PPMShipment, error)); ok { @@ -46,6 +50,10 @@ func (_m *PPMShipmentFetcher) GetPPMShipment(appCtx appcontext.AppContext, ppmSh func (_m *PPMShipmentFetcher) PostloadAssociations(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment, postloadAssociations []string) error { ret := _m.Called(appCtx, ppmShipment, postloadAssociations) + if len(ret) == 0 { + panic("no return value specified for PostloadAssociations") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment, []string) error); ok { r0 = rf(appCtx, ppmShipment, postloadAssociations) diff --git a/pkg/services/mocks/PPMShipmentNewSubmitter.go b/pkg/services/mocks/PPMShipmentNewSubmitter.go index 9b121bc1b51..c8a285e983e 100644 --- a/pkg/services/mocks/PPMShipmentNewSubmitter.go +++ b/pkg/services/mocks/PPMShipmentNewSubmitter.go @@ -20,6 +20,10 @@ type PPMShipmentNewSubmitter struct { func (_m *PPMShipmentNewSubmitter) SubmitNewCustomerCloseOut(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, signedCertification models.SignedCertification) (*models.PPMShipment, error) { ret := _m.Called(appCtx, ppmShipmentID, signedCertification) + if len(ret) == 0 { + panic("no return value specified for SubmitNewCustomerCloseOut") + } + var r0 *models.PPMShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, models.SignedCertification) (*models.PPMShipment, error)); ok { diff --git a/pkg/services/mocks/PPMShipmentReviewDocuments.go b/pkg/services/mocks/PPMShipmentReviewDocuments.go index 64b2be57f32..5a61d241e9d 100644 --- a/pkg/services/mocks/PPMShipmentReviewDocuments.go +++ b/pkg/services/mocks/PPMShipmentReviewDocuments.go @@ -20,6 +20,10 @@ type PPMShipmentReviewDocuments struct { func (_m *PPMShipmentReviewDocuments) SubmitReviewedDocuments(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.PPMShipment, error) { ret := _m.Called(appCtx, ppmShipmentID) + if len(ret) == 0 { + panic("no return value specified for SubmitReviewedDocuments") + } + var r0 *models.PPMShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.PPMShipment, error)); ok { diff --git a/pkg/services/mocks/PPMShipmentRouter.go b/pkg/services/mocks/PPMShipmentRouter.go index 8f18e9ccc9e..0ba1d4acf4f 100644 --- a/pkg/services/mocks/PPMShipmentRouter.go +++ b/pkg/services/mocks/PPMShipmentRouter.go @@ -18,6 +18,10 @@ type PPMShipmentRouter struct { func (_m *PPMShipmentRouter) SendToCustomer(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error { ret := _m.Called(appCtx, ppmShipment) + if len(ret) == 0 { + panic("no return value specified for SendToCustomer") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment) error); ok { r0 = rf(appCtx, ppmShipment) @@ -32,6 +36,10 @@ func (_m *PPMShipmentRouter) SendToCustomer(appCtx appcontext.AppContext, ppmShi func (_m *PPMShipmentRouter) SetToDraft(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error { ret := _m.Called(appCtx, ppmShipment) + if len(ret) == 0 { + panic("no return value specified for SetToDraft") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment) error); ok { r0 = rf(appCtx, ppmShipment) @@ -46,6 +54,10 @@ func (_m *PPMShipmentRouter) SetToDraft(appCtx appcontext.AppContext, ppmShipmen func (_m *PPMShipmentRouter) Submit(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error { ret := _m.Called(appCtx, ppmShipment) + if len(ret) == 0 { + panic("no return value specified for Submit") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment) error); ok { r0 = rf(appCtx, ppmShipment) @@ -60,6 +72,10 @@ func (_m *PPMShipmentRouter) Submit(appCtx appcontext.AppContext, ppmShipment *m func (_m *PPMShipmentRouter) SubmitCloseOutDocumentation(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error { ret := _m.Called(appCtx, ppmShipment) + if len(ret) == 0 { + panic("no return value specified for SubmitCloseOutDocumentation") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment) error); ok { r0 = rf(appCtx, ppmShipment) @@ -74,6 +90,10 @@ func (_m *PPMShipmentRouter) SubmitCloseOutDocumentation(appCtx appcontext.AppCo func (_m *PPMShipmentRouter) SubmitReviewedDocuments(appCtx appcontext.AppContext, ppmShipment *models.PPMShipment) error { ret := _m.Called(appCtx, ppmShipment) + if len(ret) == 0 { + panic("no return value specified for SubmitReviewedDocuments") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment) error); ok { r0 = rf(appCtx, ppmShipment) diff --git a/pkg/services/mocks/PPMShipmentUpdatedSubmitter.go b/pkg/services/mocks/PPMShipmentUpdatedSubmitter.go index ac3c3758dce..b57898033b4 100644 --- a/pkg/services/mocks/PPMShipmentUpdatedSubmitter.go +++ b/pkg/services/mocks/PPMShipmentUpdatedSubmitter.go @@ -20,6 +20,10 @@ type PPMShipmentUpdatedSubmitter struct { func (_m *PPMShipmentUpdatedSubmitter) SubmitUpdatedCustomerCloseOut(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, signedCertification models.SignedCertification, eTag string) (*models.PPMShipment, error) { ret := _m.Called(appCtx, ppmShipmentID, signedCertification, eTag) + if len(ret) == 0 { + panic("no return value specified for SubmitUpdatedCustomerCloseOut") + } + var r0 *models.PPMShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, models.SignedCertification, string) (*models.PPMShipment, error)); ok { diff --git a/pkg/services/mocks/PPMShipmentUpdater.go b/pkg/services/mocks/PPMShipmentUpdater.go index e739842a0d8..e28720368e4 100644 --- a/pkg/services/mocks/PPMShipmentUpdater.go +++ b/pkg/services/mocks/PPMShipmentUpdater.go @@ -20,6 +20,10 @@ type PPMShipmentUpdater struct { func (_m *PPMShipmentUpdater) UpdatePPMShipmentSITEstimatedCost(appCtx appcontext.AppContext, ppmshipment *models.PPMShipment) (*models.PPMShipment, error) { ret := _m.Called(appCtx, ppmshipment) + if len(ret) == 0 { + panic("no return value specified for UpdatePPMShipmentSITEstimatedCost") + } + var r0 *models.PPMShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment) (*models.PPMShipment, error)); ok { @@ -46,6 +50,10 @@ func (_m *PPMShipmentUpdater) UpdatePPMShipmentSITEstimatedCost(appCtx appcontex func (_m *PPMShipmentUpdater) UpdatePPMShipmentWithDefaultCheck(appCtx appcontext.AppContext, ppmshipment *models.PPMShipment, mtoShipmentID uuid.UUID) (*models.PPMShipment, error) { ret := _m.Called(appCtx, ppmshipment, mtoShipmentID) + if len(ret) == 0 { + panic("no return value specified for UpdatePPMShipmentWithDefaultCheck") + } + var r0 *models.PPMShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PPMShipment, uuid.UUID) (*models.PPMShipment, error)); ok { diff --git a/pkg/services/mocks/PPTASReportListFetcher.go b/pkg/services/mocks/PPTASReportListFetcher.go index 677db372766..21680bec64e 100644 --- a/pkg/services/mocks/PPTASReportListFetcher.go +++ b/pkg/services/mocks/PPTASReportListFetcher.go @@ -20,6 +20,10 @@ type PPTASReportListFetcher struct { func (_m *PPTASReportListFetcher) BuildPPTASReportsFromMoves(appCtx appcontext.AppContext, moves models.Moves) (models.PPTASReports, error) { ret := _m.Called(appCtx, moves) + if len(ret) == 0 { + panic("no return value specified for BuildPPTASReportsFromMoves") + } + var r0 models.PPTASReports var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.Moves) (models.PPTASReports, error)); ok { @@ -46,6 +50,10 @@ func (_m *PPTASReportListFetcher) BuildPPTASReportsFromMoves(appCtx appcontext.A func (_m *PPTASReportListFetcher) GetMovesForReportBuilder(appCtx appcontext.AppContext, params *services.MoveTaskOrderFetcherParams) (models.Moves, error) { ret := _m.Called(appCtx, params) + if len(ret) == 0 { + panic("no return value specified for GetMovesForReportBuilder") + } + var r0 models.Moves var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *services.MoveTaskOrderFetcherParams) (models.Moves, error)); ok { diff --git a/pkg/services/mocks/PWSViolationsFetcher.go b/pkg/services/mocks/PWSViolationsFetcher.go index 9f1b8180ce3..efe567a2221 100644 --- a/pkg/services/mocks/PWSViolationsFetcher.go +++ b/pkg/services/mocks/PWSViolationsFetcher.go @@ -18,6 +18,10 @@ type PWSViolationsFetcher struct { func (_m *PWSViolationsFetcher) GetPWSViolations(appCtx appcontext.AppContext) (*models.PWSViolations, error) { ret := _m.Called(appCtx) + if len(ret) == 0 { + panic("no return value specified for GetPWSViolations") + } + var r0 *models.PWSViolations var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext) (*models.PWSViolations, error)); ok { diff --git a/pkg/services/mocks/PaymentPacketCreator.go b/pkg/services/mocks/PaymentPacketCreator.go index f5ce175ea69..5a292cb9fbe 100644 --- a/pkg/services/mocks/PaymentPacketCreator.go +++ b/pkg/services/mocks/PaymentPacketCreator.go @@ -21,6 +21,10 @@ type PaymentPacketCreator struct { func (_m *PaymentPacketCreator) Generate(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID, addBookmarks bool, addWaterMarks bool) (io.ReadCloser, error) { ret := _m.Called(appCtx, ppmShipmentID, addBookmarks, addWaterMarks) + if len(ret) == 0 { + panic("no return value specified for Generate") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, bool, bool) (io.ReadCloser, error)); ok { @@ -47,6 +51,10 @@ func (_m *PaymentPacketCreator) Generate(appCtx appcontext.AppContext, ppmShipme func (_m *PaymentPacketCreator) GenerateDefault(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (io.ReadCloser, error) { ret := _m.Called(appCtx, ppmShipmentID) + if len(ret) == 0 { + panic("no return value specified for GenerateDefault") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (io.ReadCloser, error)); ok { diff --git a/pkg/services/mocks/PaymentRequestCreator.go b/pkg/services/mocks/PaymentRequestCreator.go index fc76b89b1f5..32e8aab60a7 100644 --- a/pkg/services/mocks/PaymentRequestCreator.go +++ b/pkg/services/mocks/PaymentRequestCreator.go @@ -18,6 +18,10 @@ type PaymentRequestCreator struct { func (_m *PaymentRequestCreator) CreatePaymentRequestCheck(appCtx appcontext.AppContext, paymentRequest *models.PaymentRequest) (*models.PaymentRequest, error) { ret := _m.Called(appCtx, paymentRequest) + if len(ret) == 0 { + panic("no return value specified for CreatePaymentRequestCheck") + } + var r0 *models.PaymentRequest var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PaymentRequest) (*models.PaymentRequest, error)); ok { diff --git a/pkg/services/mocks/PaymentRequestFetcher.go b/pkg/services/mocks/PaymentRequestFetcher.go index e14a5465635..0be3e28c08a 100644 --- a/pkg/services/mocks/PaymentRequestFetcher.go +++ b/pkg/services/mocks/PaymentRequestFetcher.go @@ -20,6 +20,10 @@ type PaymentRequestFetcher struct { func (_m *PaymentRequestFetcher) FetchPaymentRequest(appCtx appcontext.AppContext, paymentRequestID uuid.UUID) (models.PaymentRequest, error) { ret := _m.Called(appCtx, paymentRequestID) + if len(ret) == 0 { + panic("no return value specified for FetchPaymentRequest") + } + var r0 models.PaymentRequest var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (models.PaymentRequest, error)); ok { diff --git a/pkg/services/mocks/PaymentRequestListFetcher.go b/pkg/services/mocks/PaymentRequestListFetcher.go index ff21f8d8716..ebb611a7872 100644 --- a/pkg/services/mocks/PaymentRequestListFetcher.go +++ b/pkg/services/mocks/PaymentRequestListFetcher.go @@ -22,6 +22,10 @@ type PaymentRequestListFetcher struct { func (_m *PaymentRequestListFetcher) FetchPaymentRequestList(appCtx appcontext.AppContext, officeUserID uuid.UUID, params *services.FetchPaymentRequestListParams) (*models.PaymentRequests, int, error) { ret := _m.Called(appCtx, officeUserID, params) + if len(ret) == 0 { + panic("no return value specified for FetchPaymentRequestList") + } + var r0 *models.PaymentRequests var r1 int var r2 error @@ -55,6 +59,10 @@ func (_m *PaymentRequestListFetcher) FetchPaymentRequestList(appCtx appcontext.A func (_m *PaymentRequestListFetcher) FetchPaymentRequestListByMove(appCtx appcontext.AppContext, locator string) (*models.PaymentRequests, error) { ret := _m.Called(appCtx, locator) + if len(ret) == 0 { + panic("no return value specified for FetchPaymentRequestListByMove") + } + var r0 *models.PaymentRequests var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string) (*models.PaymentRequests, error)); ok { diff --git a/pkg/services/mocks/PaymentRequestRecalculator.go b/pkg/services/mocks/PaymentRequestRecalculator.go index 3374b72797e..a5698facc78 100644 --- a/pkg/services/mocks/PaymentRequestRecalculator.go +++ b/pkg/services/mocks/PaymentRequestRecalculator.go @@ -20,6 +20,10 @@ type PaymentRequestRecalculator struct { func (_m *PaymentRequestRecalculator) RecalculatePaymentRequest(appCtx appcontext.AppContext, paymentRequestID uuid.UUID) (*models.PaymentRequest, error) { ret := _m.Called(appCtx, paymentRequestID) + if len(ret) == 0 { + panic("no return value specified for RecalculatePaymentRequest") + } + var r0 *models.PaymentRequest var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.PaymentRequest, error)); ok { diff --git a/pkg/services/mocks/PaymentRequestReviewedFetcher.go b/pkg/services/mocks/PaymentRequestReviewedFetcher.go index b26e10b6927..9e93010792a 100644 --- a/pkg/services/mocks/PaymentRequestReviewedFetcher.go +++ b/pkg/services/mocks/PaymentRequestReviewedFetcher.go @@ -18,6 +18,10 @@ type PaymentRequestReviewedFetcher struct { func (_m *PaymentRequestReviewedFetcher) FetchReviewedPaymentRequest(appCtx appcontext.AppContext) (models.PaymentRequests, error) { ret := _m.Called(appCtx) + if len(ret) == 0 { + panic("no return value specified for FetchReviewedPaymentRequest") + } + var r0 models.PaymentRequests var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext) (models.PaymentRequests, error)); ok { diff --git a/pkg/services/mocks/PaymentRequestReviewedProcessor.go b/pkg/services/mocks/PaymentRequestReviewedProcessor.go index ce0372e76ac..5c852f67322 100644 --- a/pkg/services/mocks/PaymentRequestReviewedProcessor.go +++ b/pkg/services/mocks/PaymentRequestReviewedProcessor.go @@ -18,6 +18,10 @@ type PaymentRequestReviewedProcessor struct { func (_m *PaymentRequestReviewedProcessor) ProcessAndLockReviewedPR(appCtx appcontext.AppContext, pr models.PaymentRequest) error { ret := _m.Called(appCtx, pr) + if len(ret) == 0 { + panic("no return value specified for ProcessAndLockReviewedPR") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.PaymentRequest) error); ok { r0 = rf(appCtx, pr) diff --git a/pkg/services/mocks/PaymentRequestShipmentRecalculator.go b/pkg/services/mocks/PaymentRequestShipmentRecalculator.go index 4c54878445e..c8d8ef90a3a 100644 --- a/pkg/services/mocks/PaymentRequestShipmentRecalculator.go +++ b/pkg/services/mocks/PaymentRequestShipmentRecalculator.go @@ -20,6 +20,10 @@ type PaymentRequestShipmentRecalculator struct { func (_m *PaymentRequestShipmentRecalculator) ShipmentRecalculatePaymentRequest(appCtx appcontext.AppContext, shipmentID uuid.UUID) (*models.PaymentRequests, error) { ret := _m.Called(appCtx, shipmentID) + if len(ret) == 0 { + panic("no return value specified for ShipmentRecalculatePaymentRequest") + } + var r0 *models.PaymentRequests var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.PaymentRequests, error)); ok { diff --git a/pkg/services/mocks/PaymentRequestStatusUpdater.go b/pkg/services/mocks/PaymentRequestStatusUpdater.go index 692729d31fc..bd6542d2199 100644 --- a/pkg/services/mocks/PaymentRequestStatusUpdater.go +++ b/pkg/services/mocks/PaymentRequestStatusUpdater.go @@ -18,6 +18,10 @@ type PaymentRequestStatusUpdater struct { func (_m *PaymentRequestStatusUpdater) UpdatePaymentRequestStatus(appCtx appcontext.AppContext, paymentRequest *models.PaymentRequest, eTag string) (*models.PaymentRequest, error) { ret := _m.Called(appCtx, paymentRequest, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdatePaymentRequestStatus") + } + var r0 *models.PaymentRequest var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.PaymentRequest, string) (*models.PaymentRequest, error)); ok { diff --git a/pkg/services/mocks/PaymentRequestUploadCreator.go b/pkg/services/mocks/PaymentRequestUploadCreator.go index 2134ad9a981..41264555224 100644 --- a/pkg/services/mocks/PaymentRequestUploadCreator.go +++ b/pkg/services/mocks/PaymentRequestUploadCreator.go @@ -23,6 +23,10 @@ type PaymentRequestUploadCreator struct { func (_m *PaymentRequestUploadCreator) CreateUpload(appCtx appcontext.AppContext, file io.ReadCloser, paymentRequestID uuid.UUID, userID uuid.UUID, filename string, isWeightTicket bool) (*models.Upload, error) { ret := _m.Called(appCtx, file, paymentRequestID, userID, filename, isWeightTicket) + if len(ret) == 0 { + panic("no return value specified for CreateUpload") + } + var r0 *models.Upload var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, io.ReadCloser, uuid.UUID, uuid.UUID, string, bool) (*models.Upload, error)); ok { diff --git a/pkg/services/mocks/PaymentServiceItemStatusUpdater.go b/pkg/services/mocks/PaymentServiceItemStatusUpdater.go index ecade823700..350edadbe1d 100644 --- a/pkg/services/mocks/PaymentServiceItemStatusUpdater.go +++ b/pkg/services/mocks/PaymentServiceItemStatusUpdater.go @@ -22,6 +22,10 @@ type PaymentServiceItemStatusUpdater struct { func (_m *PaymentServiceItemStatusUpdater) UpdatePaymentServiceItemStatus(appCtx appcontext.AppContext, paymentServiceItemID uuid.UUID, status models.PaymentServiceItemStatus, rejectionReason *string, eTag string) (models.PaymentServiceItem, *validate.Errors, error) { ret := _m.Called(appCtx, paymentServiceItemID, status, rejectionReason, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdatePaymentServiceItemStatus") + } + var r0 models.PaymentServiceItem var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/PostalCodeValidator.go b/pkg/services/mocks/PostalCodeValidator.go index d298c7ba534..eaacb0b0a5c 100644 --- a/pkg/services/mocks/PostalCodeValidator.go +++ b/pkg/services/mocks/PostalCodeValidator.go @@ -16,6 +16,10 @@ type PostalCodeValidator struct { func (_m *PostalCodeValidator) ValidatePostalCode(appCtx appcontext.AppContext, postalCode string) (bool, error) { ret := _m.Called(appCtx, postalCode) + if len(ret) == 0 { + panic("no return value specified for ValidatePostalCode") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string) (bool, error)); ok { diff --git a/pkg/services/mocks/PrimeDownloadMoveUploadPDFGenerator.go b/pkg/services/mocks/PrimeDownloadMoveUploadPDFGenerator.go index fb3b0570213..2e2a8ae1807 100644 --- a/pkg/services/mocks/PrimeDownloadMoveUploadPDFGenerator.go +++ b/pkg/services/mocks/PrimeDownloadMoveUploadPDFGenerator.go @@ -21,6 +21,10 @@ type PrimeDownloadMoveUploadPDFGenerator struct { func (_m *PrimeDownloadMoveUploadPDFGenerator) GenerateDownloadMoveUserUploadPDF(appCtx appcontext.AppContext, moveOrderUploadType services.MoveOrderUploadType, move models.Move, addBookmarks bool) (afero.File, error) { ret := _m.Called(appCtx, moveOrderUploadType, move, addBookmarks) + if len(ret) == 0 { + panic("no return value specified for GenerateDownloadMoveUserUploadPDF") + } + var r0 afero.File var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, services.MoveOrderUploadType, models.Move, bool) (afero.File, error)); ok { diff --git a/pkg/services/mocks/ProgearWeightTicketCreator.go b/pkg/services/mocks/ProgearWeightTicketCreator.go index 5738abb06b4..5e41f32d6df 100644 --- a/pkg/services/mocks/ProgearWeightTicketCreator.go +++ b/pkg/services/mocks/ProgearWeightTicketCreator.go @@ -20,6 +20,10 @@ type ProgearWeightTicketCreator struct { func (_m *ProgearWeightTicketCreator) CreateProgearWeightTicket(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.ProgearWeightTicket, error) { ret := _m.Called(appCtx, ppmShipmentID) + if len(ret) == 0 { + panic("no return value specified for CreateProgearWeightTicket") + } + var r0 *models.ProgearWeightTicket var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.ProgearWeightTicket, error)); ok { diff --git a/pkg/services/mocks/ProgearWeightTicketDeleter.go b/pkg/services/mocks/ProgearWeightTicketDeleter.go index 387c079b15a..14d53e2a91b 100644 --- a/pkg/services/mocks/ProgearWeightTicketDeleter.go +++ b/pkg/services/mocks/ProgearWeightTicketDeleter.go @@ -18,6 +18,10 @@ type ProgearWeightTicketDeleter struct { func (_m *ProgearWeightTicketDeleter) DeleteProgearWeightTicket(appCtx appcontext.AppContext, ppmID uuid.UUID, progearWeightTicketID uuid.UUID) error { ret := _m.Called(appCtx, ppmID, progearWeightTicketID) + if len(ret) == 0 { + panic("no return value specified for DeleteProgearWeightTicket") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, uuid.UUID) error); ok { r0 = rf(appCtx, ppmID, progearWeightTicketID) diff --git a/pkg/services/mocks/ProgearWeightTicketUpdater.go b/pkg/services/mocks/ProgearWeightTicketUpdater.go index 2c0cc3fd3ab..e4b64e1677c 100644 --- a/pkg/services/mocks/ProgearWeightTicketUpdater.go +++ b/pkg/services/mocks/ProgearWeightTicketUpdater.go @@ -18,6 +18,10 @@ type ProgearWeightTicketUpdater struct { func (_m *ProgearWeightTicketUpdater) UpdateProgearWeightTicket(appCtx appcontext.AppContext, progearWeightTicket models.ProgearWeightTicket, eTag string) (*models.ProgearWeightTicket, error) { ret := _m.Called(appCtx, progearWeightTicket, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateProgearWeightTicket") + } + var r0 *models.ProgearWeightTicket var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.ProgearWeightTicket, string) (*models.ProgearWeightTicket, error)); ok { diff --git a/pkg/services/mocks/QueryAssociation.go b/pkg/services/mocks/QueryAssociation.go index b7e61711d6b..1f4fb6024b1 100644 --- a/pkg/services/mocks/QueryAssociation.go +++ b/pkg/services/mocks/QueryAssociation.go @@ -13,6 +13,10 @@ type QueryAssociation struct { func (_m *QueryAssociation) Field() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Field") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() diff --git a/pkg/services/mocks/QueryAssociations.go b/pkg/services/mocks/QueryAssociations.go index 15670197dd4..34ff0152d8a 100644 --- a/pkg/services/mocks/QueryAssociations.go +++ b/pkg/services/mocks/QueryAssociations.go @@ -13,6 +13,10 @@ type QueryAssociations struct { func (_m *QueryAssociations) Preload() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Preload") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -27,6 +31,10 @@ func (_m *QueryAssociations) Preload() bool { func (_m *QueryAssociations) StringGetAssociations() []string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StringGetAssociations") + } + var r0 []string if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() diff --git a/pkg/services/mocks/QueryFilter.go b/pkg/services/mocks/QueryFilter.go index ae0c5322b86..85fae662c5a 100644 --- a/pkg/services/mocks/QueryFilter.go +++ b/pkg/services/mocks/QueryFilter.go @@ -13,6 +13,10 @@ type QueryFilter struct { func (_m *QueryFilter) Column() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Column") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -27,6 +31,10 @@ func (_m *QueryFilter) Column() string { func (_m *QueryFilter) Comparator() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Comparator") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -41,6 +49,10 @@ func (_m *QueryFilter) Comparator() string { func (_m *QueryFilter) Value() interface{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Value") + } + var r0 interface{} if rf, ok := ret.Get(0).(func() interface{}); ok { r0 = rf() diff --git a/pkg/services/mocks/QueryOrder.go b/pkg/services/mocks/QueryOrder.go index 8c059152e49..7204067046a 100644 --- a/pkg/services/mocks/QueryOrder.go +++ b/pkg/services/mocks/QueryOrder.go @@ -13,6 +13,10 @@ type QueryOrder struct { func (_m *QueryOrder) Column() *string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Column") + } + var r0 *string if rf, ok := ret.Get(0).(func() *string); ok { r0 = rf() @@ -29,6 +33,10 @@ func (_m *QueryOrder) Column() *string { func (_m *QueryOrder) SortOrder() *bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SortOrder") + } + var r0 *bool if rf, ok := ret.Get(0).(func() *bool); ok { r0 = rf() diff --git a/pkg/services/mocks/ReportViolationFetcher.go b/pkg/services/mocks/ReportViolationFetcher.go index 0da54bf3353..5e98a3893d8 100644 --- a/pkg/services/mocks/ReportViolationFetcher.go +++ b/pkg/services/mocks/ReportViolationFetcher.go @@ -20,6 +20,10 @@ type ReportViolationFetcher struct { func (_m *ReportViolationFetcher) FetchReportViolationsByReportID(appCtx appcontext.AppContext, reportID uuid.UUID) (models.ReportViolations, error) { ret := _m.Called(appCtx, reportID) + if len(ret) == 0 { + panic("no return value specified for FetchReportViolationsByReportID") + } + var r0 models.ReportViolations var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (models.ReportViolations, error)); ok { diff --git a/pkg/services/mocks/ReportViolationsCreator.go b/pkg/services/mocks/ReportViolationsCreator.go index eb1d2e949fd..42289941f46 100644 --- a/pkg/services/mocks/ReportViolationsCreator.go +++ b/pkg/services/mocks/ReportViolationsCreator.go @@ -20,6 +20,10 @@ type ReportViolationsCreator struct { func (_m *ReportViolationsCreator) AssociateReportViolations(appCtx appcontext.AppContext, reportViolations *models.ReportViolations, reportID uuid.UUID) error { ret := _m.Called(appCtx, reportViolations, reportID) + if len(ret) == 0 { + panic("no return value specified for AssociateReportViolations") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.ReportViolations, uuid.UUID) error); ok { r0 = rf(appCtx, reportViolations, reportID) diff --git a/pkg/services/mocks/RequestedOfficeUserFetcher.go b/pkg/services/mocks/RequestedOfficeUserFetcher.go index 43f86b463b0..90e98cf5d4b 100644 --- a/pkg/services/mocks/RequestedOfficeUserFetcher.go +++ b/pkg/services/mocks/RequestedOfficeUserFetcher.go @@ -20,6 +20,10 @@ type RequestedOfficeUserFetcher struct { func (_m *RequestedOfficeUserFetcher) FetchRequestedOfficeUser(appCtx appcontext.AppContext, filters []services.QueryFilter) (models.OfficeUser, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchRequestedOfficeUser") + } + var r0 models.OfficeUser var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (models.OfficeUser, error)); ok { diff --git a/pkg/services/mocks/RequestedOfficeUserListFetcher.go b/pkg/services/mocks/RequestedOfficeUserListFetcher.go index 6c8b8631f20..98a226808eb 100644 --- a/pkg/services/mocks/RequestedOfficeUserListFetcher.go +++ b/pkg/services/mocks/RequestedOfficeUserListFetcher.go @@ -20,6 +20,10 @@ type RequestedOfficeUserListFetcher struct { func (_m *RequestedOfficeUserListFetcher) FetchRequestedOfficeUsersCount(appCtx appcontext.AppContext, filters []services.QueryFilter) (int, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchRequestedOfficeUsersCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (int, error)); ok { @@ -44,6 +48,10 @@ func (_m *RequestedOfficeUserListFetcher) FetchRequestedOfficeUsersCount(appCtx func (_m *RequestedOfficeUserListFetcher) FetchRequestedOfficeUsersList(appCtx appcontext.AppContext, filters []services.QueryFilter, associations services.QueryAssociations, pagination services.Pagination, ordering services.QueryOrder) (models.OfficeUsers, error) { ret := _m.Called(appCtx, filters, associations, pagination, ordering) + if len(ret) == 0 { + panic("no return value specified for FetchRequestedOfficeUsersList") + } + var r0 models.OfficeUsers var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter, services.QueryAssociations, services.Pagination, services.QueryOrder) (models.OfficeUsers, error)); ok { diff --git a/pkg/services/mocks/RequestedOfficeUserUpdater.go b/pkg/services/mocks/RequestedOfficeUserUpdater.go index 020558bc471..93ea4b47c52 100644 --- a/pkg/services/mocks/RequestedOfficeUserUpdater.go +++ b/pkg/services/mocks/RequestedOfficeUserUpdater.go @@ -24,6 +24,10 @@ type RequestedOfficeUserUpdater struct { func (_m *RequestedOfficeUserUpdater) UpdateRequestedOfficeUser(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.RequestedOfficeUserUpdate) (*models.OfficeUser, *validate.Errors, error) { ret := _m.Called(appCtx, id, payload) + if len(ret) == 0 { + panic("no return value specified for UpdateRequestedOfficeUser") + } + var r0 *models.OfficeUser var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/RoleAssociater.go b/pkg/services/mocks/RoleAssociater.go index f55d57ff9cd..4cf83191567 100644 --- a/pkg/services/mocks/RoleAssociater.go +++ b/pkg/services/mocks/RoleAssociater.go @@ -20,6 +20,10 @@ type RoleAssociater struct { func (_m *RoleAssociater) FetchRolesForUser(appCtx appcontext.AppContext, userID uuid.UUID) (roles.Roles, error) { ret := _m.Called(appCtx, userID) + if len(ret) == 0 { + panic("no return value specified for FetchRolesForUser") + } + var r0 roles.Roles var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (roles.Roles, error)); ok { diff --git a/pkg/services/mocks/SFTPClient.go b/pkg/services/mocks/SFTPClient.go index 582a39602c9..7f26113dedd 100644 --- a/pkg/services/mocks/SFTPClient.go +++ b/pkg/services/mocks/SFTPClient.go @@ -18,6 +18,10 @@ type SFTPClient struct { func (_m *SFTPClient) Open(path string) (services.SFTPFiler, error) { ret := _m.Called(path) + if len(ret) == 0 { + panic("no return value specified for Open") + } + var r0 services.SFTPFiler var r1 error if rf, ok := ret.Get(0).(func(string) (services.SFTPFiler, error)); ok { @@ -44,6 +48,10 @@ func (_m *SFTPClient) Open(path string) (services.SFTPFiler, error) { func (_m *SFTPClient) ReadDir(p string) ([]fs.FileInfo, error) { ret := _m.Called(p) + if len(ret) == 0 { + panic("no return value specified for ReadDir") + } + var r0 []fs.FileInfo var r1 error if rf, ok := ret.Get(0).(func(string) ([]fs.FileInfo, error)); ok { @@ -70,6 +78,10 @@ func (_m *SFTPClient) ReadDir(p string) ([]fs.FileInfo, error) { func (_m *SFTPClient) Remove(path string) error { ret := _m.Called(path) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(path) diff --git a/pkg/services/mocks/SFTPFiler.go b/pkg/services/mocks/SFTPFiler.go index f4b4ec2a593..d145a4f5800 100644 --- a/pkg/services/mocks/SFTPFiler.go +++ b/pkg/services/mocks/SFTPFiler.go @@ -17,6 +17,10 @@ type SFTPFiler struct { func (_m *SFTPFiler) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -31,6 +35,10 @@ func (_m *SFTPFiler) Close() error { func (_m *SFTPFiler) WriteTo(w io.Writer) (int64, error) { ret := _m.Called(w) + if len(ret) == 0 { + panic("no return value specified for WriteTo") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(io.Writer) (int64, error)); ok { diff --git a/pkg/services/mocks/SITExtensionApprover.go b/pkg/services/mocks/SITExtensionApprover.go index baf323af02f..fa8cbac6da8 100644 --- a/pkg/services/mocks/SITExtensionApprover.go +++ b/pkg/services/mocks/SITExtensionApprover.go @@ -20,6 +20,10 @@ type SITExtensionApprover struct { func (_m *SITExtensionApprover) ApproveSITExtension(appCtx appcontext.AppContext, shipmentID uuid.UUID, sitExtensionID uuid.UUID, approvedDays int, requestReason models.SITDurationUpdateRequestReason, officeRemarks *string, eTag string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipmentID, sitExtensionID, approvedDays, requestReason, officeRemarks, eTag) + if len(ret) == 0 { + panic("no return value specified for ApproveSITExtension") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, uuid.UUID, int, models.SITDurationUpdateRequestReason, *string, string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/SITExtensionDenier.go b/pkg/services/mocks/SITExtensionDenier.go index 3764367b81d..5b7970f44b2 100644 --- a/pkg/services/mocks/SITExtensionDenier.go +++ b/pkg/services/mocks/SITExtensionDenier.go @@ -20,6 +20,10 @@ type SITExtensionDenier struct { func (_m *SITExtensionDenier) DenySITExtension(appCtx appcontext.AppContext, shipmentID uuid.UUID, sitExtensionID uuid.UUID, officeRemarks *string, convertToCustomerExpense *bool, eTag string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipmentID, sitExtensionID, officeRemarks, convertToCustomerExpense, eTag) + if len(ret) == 0 { + panic("no return value specified for DenySITExtension") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, uuid.UUID, *string, *bool, string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/SSWPPMComputer.go b/pkg/services/mocks/SSWPPMComputer.go index a47849b0f68..52b9542ff5b 100644 --- a/pkg/services/mocks/SSWPPMComputer.go +++ b/pkg/services/mocks/SSWPPMComputer.go @@ -26,6 +26,10 @@ type SSWPPMComputer struct { func (_m *SSWPPMComputer) ComputeObligations(_a0 appcontext.AppContext, _a1 models.ShipmentSummaryFormData, _a2 route.Planner) (models.Obligations, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for ComputeObligations") + } + var r0 models.Obligations var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.ShipmentSummaryFormData, route.Planner) (models.Obligations, error)); ok { @@ -50,6 +54,10 @@ func (_m *SSWPPMComputer) ComputeObligations(_a0 appcontext.AppContext, _a1 mode func (_m *SSWPPMComputer) FetchDataShipmentSummaryWorksheetFormData(appCtx appcontext.AppContext, _a1 *auth.Session, ppmShipmentID uuid.UUID) (*models.ShipmentSummaryFormData, error) { ret := _m.Called(appCtx, _a1, ppmShipmentID) + if len(ret) == 0 { + panic("no return value specified for FetchDataShipmentSummaryWorksheetFormData") + } + var r0 *models.ShipmentSummaryFormData var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *auth.Session, uuid.UUID) (*models.ShipmentSummaryFormData, error)); ok { @@ -76,6 +84,10 @@ func (_m *SSWPPMComputer) FetchDataShipmentSummaryWorksheetFormData(appCtx appco func (_m *SSWPPMComputer) FormatShipment(ppm models.PPMShipment, weightAllotment models.SSWMaxWeightEntitlement, isPaymentPacket bool) models.WorkSheetShipment { ret := _m.Called(ppm, weightAllotment, isPaymentPacket) + if len(ret) == 0 { + panic("no return value specified for FormatShipment") + } + var r0 models.WorkSheetShipment if rf, ok := ret.Get(0).(func(models.PPMShipment, models.SSWMaxWeightEntitlement, bool) models.WorkSheetShipment); ok { r0 = rf(ppm, weightAllotment, isPaymentPacket) @@ -90,6 +102,10 @@ func (_m *SSWPPMComputer) FormatShipment(ppm models.PPMShipment, weightAllotment func (_m *SSWPPMComputer) FormatValuesShipmentSummaryWorksheet(shipmentSummaryFormData models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page1Values, services.Page2Values, services.Page3Values, error) { ret := _m.Called(shipmentSummaryFormData, isPaymentPacket) + if len(ret) == 0 { + panic("no return value specified for FormatValuesShipmentSummaryWorksheet") + } + var r0 services.Page1Values var r1 services.Page2Values var r2 services.Page3Values @@ -128,6 +144,10 @@ func (_m *SSWPPMComputer) FormatValuesShipmentSummaryWorksheet(shipmentSummaryFo func (_m *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage1(data models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page1Values, error) { ret := _m.Called(data, isPaymentPacket) + if len(ret) == 0 { + panic("no return value specified for FormatValuesShipmentSummaryWorksheetFormPage1") + } + var r0 services.Page1Values var r1 error if rf, ok := ret.Get(0).(func(models.ShipmentSummaryFormData, bool) (services.Page1Values, error)); ok { @@ -152,6 +172,10 @@ func (_m *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage1(data mod func (_m *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage2(data models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page2Values, error) { ret := _m.Called(data, isPaymentPacket) + if len(ret) == 0 { + panic("no return value specified for FormatValuesShipmentSummaryWorksheetFormPage2") + } + var r0 services.Page2Values var r1 error if rf, ok := ret.Get(0).(func(models.ShipmentSummaryFormData, bool) (services.Page2Values, error)); ok { @@ -176,6 +200,10 @@ func (_m *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage2(data mod func (_m *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage3(data models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page3Values, error) { ret := _m.Called(data, isPaymentPacket) + if len(ret) == 0 { + panic("no return value specified for FormatValuesShipmentSummaryWorksheetFormPage3") + } + var r0 services.Page3Values var r1 error if rf, ok := ret.Get(0).(func(models.ShipmentSummaryFormData, bool) (services.Page3Values, error)); ok { diff --git a/pkg/services/mocks/SSWPPMGenerator.go b/pkg/services/mocks/SSWPPMGenerator.go index 77cd13c30f5..25de529eea9 100644 --- a/pkg/services/mocks/SSWPPMGenerator.go +++ b/pkg/services/mocks/SSWPPMGenerator.go @@ -20,6 +20,10 @@ type SSWPPMGenerator struct { func (_m *SSWPPMGenerator) FillSSWPDFForm(_a0 services.Page1Values, _a1 services.Page2Values, _a2 services.Page3Values) (afero.File, *pdfcpu.PDFInfo, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for FillSSWPDFForm") + } + var r0 afero.File var r1 *pdfcpu.PDFInfo var r2 error diff --git a/pkg/services/mocks/ServiceItemPricer.go b/pkg/services/mocks/ServiceItemPricer.go index 6ee636b19fa..99be2f59c84 100644 --- a/pkg/services/mocks/ServiceItemPricer.go +++ b/pkg/services/mocks/ServiceItemPricer.go @@ -20,6 +20,10 @@ type ServiceItemPricer struct { func (_m *ServiceItemPricer) PriceServiceItem(appCtx appcontext.AppContext, item models.PaymentServiceItem) (unit.Cents, models.PaymentServiceItemParams, error) { ret := _m.Called(appCtx, item) + if len(ret) == 0 { + panic("no return value specified for PriceServiceItem") + } + var r0 unit.Cents var r1 models.PaymentServiceItemParams var r2 error diff --git a/pkg/services/mocks/ServiceRequestDocumentUploadCreator.go b/pkg/services/mocks/ServiceRequestDocumentUploadCreator.go index 750c16483be..0fd929ed741 100644 --- a/pkg/services/mocks/ServiceRequestDocumentUploadCreator.go +++ b/pkg/services/mocks/ServiceRequestDocumentUploadCreator.go @@ -23,6 +23,10 @@ type ServiceRequestDocumentUploadCreator struct { func (_m *ServiceRequestDocumentUploadCreator) CreateUpload(appCtx appcontext.AppContext, file io.ReadCloser, mtoServiceItemID uuid.UUID, userID uuid.UUID, filename string) (*models.Upload, error) { ret := _m.Called(appCtx, file, mtoServiceItemID, userID, filename) + if len(ret) == 0 { + panic("no return value specified for CreateUpload") + } + var r0 *models.Upload var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, io.ReadCloser, uuid.UUID, uuid.UUID, string) (*models.Upload, error)); ok { diff --git a/pkg/services/mocks/ShipmentAddressUpdateRequester.go b/pkg/services/mocks/ShipmentAddressUpdateRequester.go index 33896ecf5e1..190f5c25571 100644 --- a/pkg/services/mocks/ShipmentAddressUpdateRequester.go +++ b/pkg/services/mocks/ShipmentAddressUpdateRequester.go @@ -20,6 +20,10 @@ type ShipmentAddressUpdateRequester struct { func (_m *ShipmentAddressUpdateRequester) RequestShipmentDeliveryAddressUpdate(appCtx appcontext.AppContext, shipmentID uuid.UUID, newAddress models.Address, contractorRemarks string, eTag string) (*models.ShipmentAddressUpdate, error) { ret := _m.Called(appCtx, shipmentID, newAddress, contractorRemarks, eTag) + if len(ret) == 0 { + panic("no return value specified for RequestShipmentDeliveryAddressUpdate") + } + var r0 *models.ShipmentAddressUpdate var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, models.Address, string, string) (*models.ShipmentAddressUpdate, error)); ok { @@ -46,6 +50,10 @@ func (_m *ShipmentAddressUpdateRequester) RequestShipmentDeliveryAddressUpdate(a func (_m *ShipmentAddressUpdateRequester) ReviewShipmentAddressChange(appCtx appcontext.AppContext, shipmentID uuid.UUID, tooApprovalStatus models.ShipmentAddressUpdateStatus, tooRemarks string) (*models.ShipmentAddressUpdate, error) { ret := _m.Called(appCtx, shipmentID, tooApprovalStatus, tooRemarks) + if len(ret) == 0 { + panic("no return value specified for ReviewShipmentAddressChange") + } + var r0 *models.ShipmentAddressUpdate var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, models.ShipmentAddressUpdateStatus, string) (*models.ShipmentAddressUpdate, error)); ok { diff --git a/pkg/services/mocks/ShipmentApprover.go b/pkg/services/mocks/ShipmentApprover.go index af1336d2d54..ede7bdcc395 100644 --- a/pkg/services/mocks/ShipmentApprover.go +++ b/pkg/services/mocks/ShipmentApprover.go @@ -20,6 +20,10 @@ type ShipmentApprover struct { func (_m *ShipmentApprover) ApproveShipment(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipmentID, eTag) + if len(ret) == 0 { + panic("no return value specified for ApproveShipment") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/ShipmentBillableWeightCalculator.go b/pkg/services/mocks/ShipmentBillableWeightCalculator.go index e94fcf60786..9b4a54fa79b 100644 --- a/pkg/services/mocks/ShipmentBillableWeightCalculator.go +++ b/pkg/services/mocks/ShipmentBillableWeightCalculator.go @@ -18,6 +18,10 @@ type ShipmentBillableWeightCalculator struct { func (_m *ShipmentBillableWeightCalculator) CalculateShipmentBillableWeight(shipment *models.MTOShipment) services.BillableWeightInputs { ret := _m.Called(shipment) + if len(ret) == 0 { + panic("no return value specified for CalculateShipmentBillableWeight") + } + var r0 services.BillableWeightInputs if rf, ok := ret.Get(0).(func(*models.MTOShipment) services.BillableWeightInputs); ok { r0 = rf(shipment) diff --git a/pkg/services/mocks/ShipmentCancellationRequester.go b/pkg/services/mocks/ShipmentCancellationRequester.go index ed3007f89a1..cc45f81cae0 100644 --- a/pkg/services/mocks/ShipmentCancellationRequester.go +++ b/pkg/services/mocks/ShipmentCancellationRequester.go @@ -20,6 +20,10 @@ type ShipmentCancellationRequester struct { func (_m *ShipmentCancellationRequester) RequestShipmentCancellation(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipmentID, eTag) + if len(ret) == 0 { + panic("no return value specified for RequestShipmentCancellation") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/ShipmentCreator.go b/pkg/services/mocks/ShipmentCreator.go index c1551a93310..783ef1d9cec 100644 --- a/pkg/services/mocks/ShipmentCreator.go +++ b/pkg/services/mocks/ShipmentCreator.go @@ -18,6 +18,10 @@ type ShipmentCreator struct { func (_m *ShipmentCreator) CreateShipment(appCtx appcontext.AppContext, shipment *models.MTOShipment) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipment) + if len(ret) == 0 { + panic("no return value specified for CreateShipment") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/ShipmentDeleter.go b/pkg/services/mocks/ShipmentDeleter.go index 846b0a92b6e..891cae09cde 100644 --- a/pkg/services/mocks/ShipmentDeleter.go +++ b/pkg/services/mocks/ShipmentDeleter.go @@ -18,6 +18,10 @@ type ShipmentDeleter struct { func (_m *ShipmentDeleter) DeleteShipment(appCtx appcontext.AppContext, shipmentID uuid.UUID) (uuid.UUID, error) { ret := _m.Called(appCtx, shipmentID) + if len(ret) == 0 { + panic("no return value specified for DeleteShipment") + } + var r0 uuid.UUID var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (uuid.UUID, error)); ok { diff --git a/pkg/services/mocks/ShipmentDiversionApprover.go b/pkg/services/mocks/ShipmentDiversionApprover.go index 6ba0295fb58..a531560e88e 100644 --- a/pkg/services/mocks/ShipmentDiversionApprover.go +++ b/pkg/services/mocks/ShipmentDiversionApprover.go @@ -20,6 +20,10 @@ type ShipmentDiversionApprover struct { func (_m *ShipmentDiversionApprover) ApproveShipmentDiversion(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipmentID, eTag) + if len(ret) == 0 { + panic("no return value specified for ApproveShipmentDiversion") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/ShipmentDiversionRequester.go b/pkg/services/mocks/ShipmentDiversionRequester.go index 53db6efad35..9041acdd24b 100644 --- a/pkg/services/mocks/ShipmentDiversionRequester.go +++ b/pkg/services/mocks/ShipmentDiversionRequester.go @@ -20,6 +20,10 @@ type ShipmentDiversionRequester struct { func (_m *ShipmentDiversionRequester) RequestShipmentDiversion(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string, diversionReason *string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipmentID, eTag, diversionReason) + if len(ret) == 0 { + panic("no return value specified for RequestShipmentDiversion") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string, *string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/ShipmentRejecter.go b/pkg/services/mocks/ShipmentRejecter.go index 56d2b97279b..5c52fd55da7 100644 --- a/pkg/services/mocks/ShipmentRejecter.go +++ b/pkg/services/mocks/ShipmentRejecter.go @@ -20,6 +20,10 @@ type ShipmentRejecter struct { func (_m *ShipmentRejecter) RejectShipment(appCtx appcontext.AppContext, shipmentID uuid.UUID, eTag string, reason *string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipmentID, eTag, reason) + if len(ret) == 0 { + panic("no return value specified for RejectShipment") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string, *string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/ShipmentReweighRequester.go b/pkg/services/mocks/ShipmentReweighRequester.go index 8b2d493c7fb..ee17e680975 100644 --- a/pkg/services/mocks/ShipmentReweighRequester.go +++ b/pkg/services/mocks/ShipmentReweighRequester.go @@ -20,6 +20,10 @@ type ShipmentReweighRequester struct { func (_m *ShipmentReweighRequester) RequestShipmentReweigh(appCtx appcontext.AppContext, shipmentID uuid.UUID, requestor models.ReweighRequester) (*models.Reweigh, error) { ret := _m.Called(appCtx, shipmentID, requestor) + if len(ret) == 0 { + panic("no return value specified for RequestShipmentReweigh") + } + var r0 *models.Reweigh var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, models.ReweighRequester) (*models.Reweigh, error)); ok { diff --git a/pkg/services/mocks/ShipmentRouter.go b/pkg/services/mocks/ShipmentRouter.go index 1b29c6ade37..2e752b3b551 100644 --- a/pkg/services/mocks/ShipmentRouter.go +++ b/pkg/services/mocks/ShipmentRouter.go @@ -18,6 +18,10 @@ type ShipmentRouter struct { func (_m *ShipmentRouter) Approve(appCtx appcontext.AppContext, shipment *models.MTOShipment) error { ret := _m.Called(appCtx, shipment) + if len(ret) == 0 { + panic("no return value specified for Approve") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment) error); ok { r0 = rf(appCtx, shipment) @@ -32,6 +36,10 @@ func (_m *ShipmentRouter) Approve(appCtx appcontext.AppContext, shipment *models func (_m *ShipmentRouter) ApproveDiversion(appCtx appcontext.AppContext, shipment *models.MTOShipment) error { ret := _m.Called(appCtx, shipment) + if len(ret) == 0 { + panic("no return value specified for ApproveDiversion") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment) error); ok { r0 = rf(appCtx, shipment) @@ -46,6 +54,10 @@ func (_m *ShipmentRouter) ApproveDiversion(appCtx appcontext.AppContext, shipmen func (_m *ShipmentRouter) Cancel(appCtx appcontext.AppContext, shipment *models.MTOShipment) error { ret := _m.Called(appCtx, shipment) + if len(ret) == 0 { + panic("no return value specified for Cancel") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment) error); ok { r0 = rf(appCtx, shipment) @@ -60,6 +72,10 @@ func (_m *ShipmentRouter) Cancel(appCtx appcontext.AppContext, shipment *models. func (_m *ShipmentRouter) Reject(appCtx appcontext.AppContext, shipment *models.MTOShipment, rejectionReason *string) error { ret := _m.Called(appCtx, shipment, rejectionReason) + if len(ret) == 0 { + panic("no return value specified for Reject") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment, *string) error); ok { r0 = rf(appCtx, shipment, rejectionReason) @@ -74,6 +90,10 @@ func (_m *ShipmentRouter) Reject(appCtx appcontext.AppContext, shipment *models. func (_m *ShipmentRouter) RequestCancellation(appCtx appcontext.AppContext, shipment *models.MTOShipment) error { ret := _m.Called(appCtx, shipment) + if len(ret) == 0 { + panic("no return value specified for RequestCancellation") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment) error); ok { r0 = rf(appCtx, shipment) @@ -88,6 +108,10 @@ func (_m *ShipmentRouter) RequestCancellation(appCtx appcontext.AppContext, ship func (_m *ShipmentRouter) RequestDiversion(appCtx appcontext.AppContext, shipment *models.MTOShipment, diversionReason *string) error { ret := _m.Called(appCtx, shipment, diversionReason) + if len(ret) == 0 { + panic("no return value specified for RequestDiversion") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment, *string) error); ok { r0 = rf(appCtx, shipment, diversionReason) @@ -102,6 +126,10 @@ func (_m *ShipmentRouter) RequestDiversion(appCtx appcontext.AppContext, shipmen func (_m *ShipmentRouter) Submit(appCtx appcontext.AppContext, shipment *models.MTOShipment) error { ret := _m.Called(appCtx, shipment) + if len(ret) == 0 { + panic("no return value specified for Submit") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment) error); ok { r0 = rf(appCtx, shipment) diff --git a/pkg/services/mocks/ShipmentSITStatus.go b/pkg/services/mocks/ShipmentSITStatus.go index 64aff2c98cc..86b760f36d9 100644 --- a/pkg/services/mocks/ShipmentSITStatus.go +++ b/pkg/services/mocks/ShipmentSITStatus.go @@ -20,6 +20,10 @@ type ShipmentSITStatus struct { func (_m *ShipmentSITStatus) CalculateShipmentSITAllowance(appCtx appcontext.AppContext, shipment models.MTOShipment) (int, error) { ret := _m.Called(appCtx, shipment) + if len(ret) == 0 { + panic("no return value specified for CalculateShipmentSITAllowance") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.MTOShipment) (int, error)); ok { @@ -44,6 +48,10 @@ func (_m *ShipmentSITStatus) CalculateShipmentSITAllowance(appCtx appcontext.App func (_m *ShipmentSITStatus) CalculateShipmentSITStatus(appCtx appcontext.AppContext, shipment models.MTOShipment) (*services.SITStatus, models.MTOShipment, error) { ret := _m.Called(appCtx, shipment) + if len(ret) == 0 { + panic("no return value specified for CalculateShipmentSITStatus") + } + var r0 *services.SITStatus var r1 models.MTOShipment var r2 error @@ -77,6 +85,10 @@ func (_m *ShipmentSITStatus) CalculateShipmentSITStatus(appCtx appcontext.AppCon func (_m *ShipmentSITStatus) CalculateShipmentsSITStatuses(appCtx appcontext.AppContext, shipments []models.MTOShipment) map[string]services.SITStatus { ret := _m.Called(appCtx, shipments) + if len(ret) == 0 { + panic("no return value specified for CalculateShipmentsSITStatuses") + } + var r0 map[string]services.SITStatus if rf, ok := ret.Get(0).(func(appcontext.AppContext, []models.MTOShipment) map[string]services.SITStatus); ok { r0 = rf(appCtx, shipments) @@ -93,6 +105,10 @@ func (_m *ShipmentSITStatus) CalculateShipmentsSITStatuses(appCtx appcontext.App func (_m *ShipmentSITStatus) RetrieveShipmentSIT(appCtx appcontext.AppContext, shipment models.MTOShipment) (models.SITServiceItemGroupings, error) { ret := _m.Called(appCtx, shipment) + if len(ret) == 0 { + panic("no return value specified for RetrieveShipmentSIT") + } + var r0 models.SITServiceItemGroupings var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.MTOShipment) (models.SITServiceItemGroupings, error)); ok { diff --git a/pkg/services/mocks/ShipmentUpdater.go b/pkg/services/mocks/ShipmentUpdater.go index 9ea48b83353..94bc241b543 100644 --- a/pkg/services/mocks/ShipmentUpdater.go +++ b/pkg/services/mocks/ShipmentUpdater.go @@ -18,6 +18,10 @@ type ShipmentUpdater struct { func (_m *ShipmentUpdater) UpdateShipment(appCtx appcontext.AppContext, shipment *models.MTOShipment, eTag string, api string) (*models.MTOShipment, error) { ret := _m.Called(appCtx, shipment, eTag, api) + if len(ret) == 0 { + panic("no return value specified for UpdateShipment") + } + var r0 *models.MTOShipment var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.MTOShipment, string, string) (*models.MTOShipment, error)); ok { diff --git a/pkg/services/mocks/ShipmentsPaymentSITBalance.go b/pkg/services/mocks/ShipmentsPaymentSITBalance.go index 6fe98ff06b5..ecb8d2a65df 100644 --- a/pkg/services/mocks/ShipmentsPaymentSITBalance.go +++ b/pkg/services/mocks/ShipmentsPaymentSITBalance.go @@ -20,6 +20,10 @@ type ShipmentsPaymentSITBalance struct { func (_m *ShipmentsPaymentSITBalance) ListShipmentPaymentSITBalance(appCtx appcontext.AppContext, paymentRequestID uuid.UUID) ([]services.ShipmentPaymentSITBalance, error) { ret := _m.Called(appCtx, paymentRequestID) + if len(ret) == 0 { + panic("no return value specified for ListShipmentPaymentSITBalance") + } + var r0 []services.ShipmentPaymentSITBalance var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) ([]services.ShipmentPaymentSITBalance, error)); ok { diff --git a/pkg/services/mocks/SignedCertificationCreator.go b/pkg/services/mocks/SignedCertificationCreator.go index 1b491d6e3c2..8df6a173558 100644 --- a/pkg/services/mocks/SignedCertificationCreator.go +++ b/pkg/services/mocks/SignedCertificationCreator.go @@ -18,6 +18,10 @@ type SignedCertificationCreator struct { func (_m *SignedCertificationCreator) CreateSignedCertification(appCtx appcontext.AppContext, signedCertification models.SignedCertification) (*models.SignedCertification, error) { ret := _m.Called(appCtx, signedCertification) + if len(ret) == 0 { + panic("no return value specified for CreateSignedCertification") + } + var r0 *models.SignedCertification var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.SignedCertification) (*models.SignedCertification, error)); ok { diff --git a/pkg/services/mocks/SignedCertificationUpdater.go b/pkg/services/mocks/SignedCertificationUpdater.go index 1afadd5ce1d..e9edbb4e6e6 100644 --- a/pkg/services/mocks/SignedCertificationUpdater.go +++ b/pkg/services/mocks/SignedCertificationUpdater.go @@ -18,6 +18,10 @@ type SignedCertificationUpdater struct { func (_m *SignedCertificationUpdater) UpdateSignedCertification(appCtx appcontext.AppContext, signedCertification models.SignedCertification, eTag string) (*models.SignedCertification, error) { ret := _m.Called(appCtx, signedCertification, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateSignedCertification") + } + var r0 *models.SignedCertification var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.SignedCertification, string) (*models.SignedCertification, error)); ok { diff --git a/pkg/services/mocks/SitEntryDateUpdater.go b/pkg/services/mocks/SitEntryDateUpdater.go index d0769cda0e0..807f5dd3328 100644 --- a/pkg/services/mocks/SitEntryDateUpdater.go +++ b/pkg/services/mocks/SitEntryDateUpdater.go @@ -18,6 +18,10 @@ type SitEntryDateUpdater struct { func (_m *SitEntryDateUpdater) UpdateSitEntryDate(appCtx appcontext.AppContext, sitEntryDateUpdate *models.SITEntryDateUpdate) (*models.MTOServiceItem, error) { ret := _m.Called(appCtx, sitEntryDateUpdate) + if len(ret) == 0 { + panic("no return value specified for UpdateSitEntryDate") + } + var r0 *models.MTOServiceItem var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.SITEntryDateUpdate) (*models.MTOServiceItem, error)); ok { diff --git a/pkg/services/mocks/SyncadaFileProcessor.go b/pkg/services/mocks/SyncadaFileProcessor.go index 7c5ea5c30d0..4b29da4ab58 100644 --- a/pkg/services/mocks/SyncadaFileProcessor.go +++ b/pkg/services/mocks/SyncadaFileProcessor.go @@ -18,6 +18,10 @@ type SyncadaFileProcessor struct { func (_m *SyncadaFileProcessor) EDIType() models.EDIType { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EDIType") + } + var r0 models.EDIType if rf, ok := ret.Get(0).(func() models.EDIType); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *SyncadaFileProcessor) EDIType() models.EDIType { func (_m *SyncadaFileProcessor) ProcessFile(appCtx appcontext.AppContext, syncadaPath string, text string) error { ret := _m.Called(appCtx, syncadaPath, text) + if len(ret) == 0 { + panic("no return value specified for ProcessFile") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, string) error); ok { r0 = rf(appCtx, syncadaPath, text) diff --git a/pkg/services/mocks/SyncadaSFTPReader.go b/pkg/services/mocks/SyncadaSFTPReader.go index 9f9ca73880c..b48cfea842d 100644 --- a/pkg/services/mocks/SyncadaSFTPReader.go +++ b/pkg/services/mocks/SyncadaSFTPReader.go @@ -20,6 +20,10 @@ type SyncadaSFTPReader struct { func (_m *SyncadaSFTPReader) FetchAndProcessSyncadaFiles(appCtx appcontext.AppContext, pickupPath string, lastRead time.Time, processor services.SyncadaFileProcessor) (time.Time, error) { ret := _m.Called(appCtx, pickupPath, lastRead, processor) + if len(ret) == 0 { + panic("no return value specified for FetchAndProcessSyncadaFiles") + } + var r0 time.Time var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, time.Time, services.SyncadaFileProcessor) (time.Time, error)); ok { diff --git a/pkg/services/mocks/SyncadaSFTPSender.go b/pkg/services/mocks/SyncadaSFTPSender.go index 8375ff54d76..a63035da958 100644 --- a/pkg/services/mocks/SyncadaSFTPSender.go +++ b/pkg/services/mocks/SyncadaSFTPSender.go @@ -19,6 +19,10 @@ type SyncadaSFTPSender struct { func (_m *SyncadaSFTPSender) SendToSyncadaViaSFTP(appCtx appcontext.AppContext, localDataReader io.Reader, syncadaFileName string) (int64, error) { ret := _m.Called(appCtx, localDataReader, syncadaFileName) + if len(ret) == 0 { + panic("no return value specified for SendToSyncadaViaSFTP") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, io.Reader, string) (int64, error)); ok { diff --git a/pkg/services/mocks/TableFromSliceCreator.go b/pkg/services/mocks/TableFromSliceCreator.go index 27596344405..ccb5a81cdcf 100644 --- a/pkg/services/mocks/TableFromSliceCreator.go +++ b/pkg/services/mocks/TableFromSliceCreator.go @@ -16,6 +16,10 @@ type TableFromSliceCreator struct { func (_m *TableFromSliceCreator) CreateTableFromSlice(appCtx appcontext.AppContext, slice interface{}) error { ret := _m.Called(appCtx, slice) + if len(ret) == 0 { + panic("no return value specified for CreateTableFromSlice") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, interface{}) error); ok { r0 = rf(appCtx, slice) diff --git a/pkg/services/mocks/TransportationAccountingCodeFetcher.go b/pkg/services/mocks/TransportationAccountingCodeFetcher.go index fdcd529c888..735b2727f6b 100644 --- a/pkg/services/mocks/TransportationAccountingCodeFetcher.go +++ b/pkg/services/mocks/TransportationAccountingCodeFetcher.go @@ -20,6 +20,10 @@ type TransportationAccountingCodeFetcher struct { func (_m *TransportationAccountingCodeFetcher) FetchOrderTransportationAccountingCodes(serviceMemberAffiliation models.ServiceMemberAffiliation, ordersIssueDate time.Time, tacCode string, appCtx appcontext.AppContext) ([]models.TransportationAccountingCode, error) { ret := _m.Called(serviceMemberAffiliation, ordersIssueDate, tacCode, appCtx) + if len(ret) == 0 { + panic("no return value specified for FetchOrderTransportationAccountingCodes") + } + var r0 []models.TransportationAccountingCode var r1 error if rf, ok := ret.Get(0).(func(models.ServiceMemberAffiliation, time.Time, string, appcontext.AppContext) ([]models.TransportationAccountingCode, error)); ok { diff --git a/pkg/services/mocks/TransportationOfficesFetcher.go b/pkg/services/mocks/TransportationOfficesFetcher.go index 80a2cf58f39..eed32753594 100644 --- a/pkg/services/mocks/TransportationOfficesFetcher.go +++ b/pkg/services/mocks/TransportationOfficesFetcher.go @@ -20,6 +20,10 @@ type TransportationOfficesFetcher struct { func (_m *TransportationOfficesFetcher) GetAllGBLOCs(appCtx appcontext.AppContext) (*models.GBLOCs, error) { ret := _m.Called(appCtx) + if len(ret) == 0 { + panic("no return value specified for GetAllGBLOCs") + } + var r0 *models.GBLOCs var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext) (*models.GBLOCs, error)); ok { @@ -46,6 +50,10 @@ func (_m *TransportationOfficesFetcher) GetAllGBLOCs(appCtx appcontext.AppContex func (_m *TransportationOfficesFetcher) GetCounselingOffices(appCtx appcontext.AppContext, dutyLocationID uuid.UUID) (*models.TransportationOffices, error) { ret := _m.Called(appCtx, dutyLocationID) + if len(ret) == 0 { + panic("no return value specified for GetCounselingOffices") + } + var r0 *models.TransportationOffices var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.TransportationOffices, error)); ok { @@ -72,6 +80,10 @@ func (_m *TransportationOfficesFetcher) GetCounselingOffices(appCtx appcontext.A func (_m *TransportationOfficesFetcher) GetTransportationOffice(appCtx appcontext.AppContext, transportationOfficeID uuid.UUID, includeOnlyPPMCloseoutOffices bool) (*models.TransportationOffice, error) { ret := _m.Called(appCtx, transportationOfficeID, includeOnlyPPMCloseoutOffices) + if len(ret) == 0 { + panic("no return value specified for GetTransportationOffice") + } + var r0 *models.TransportationOffice var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, bool) (*models.TransportationOffice, error)); ok { @@ -98,6 +110,10 @@ func (_m *TransportationOfficesFetcher) GetTransportationOffice(appCtx appcontex func (_m *TransportationOfficesFetcher) GetTransportationOffices(appCtx appcontext.AppContext, search string, forPpm bool) (*models.TransportationOffices, error) { ret := _m.Called(appCtx, search, forPpm) + if len(ret) == 0 { + panic("no return value specified for GetTransportationOffices") + } + var r0 *models.TransportationOffices var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string, bool) (*models.TransportationOffices, error)); ok { diff --git a/pkg/services/mocks/UploadCreator.go b/pkg/services/mocks/UploadCreator.go index 38cffb50524..8c565dc2ef8 100644 --- a/pkg/services/mocks/UploadCreator.go +++ b/pkg/services/mocks/UploadCreator.go @@ -21,6 +21,10 @@ type UploadCreator struct { func (_m *UploadCreator) CreateUpload(appCtx appcontext.AppContext, file io.ReadCloser, uploadFilename string, uploadType models.UploadType) (*models.Upload, error) { ret := _m.Called(appCtx, file, uploadFilename, uploadType) + if len(ret) == 0 { + panic("no return value specified for CreateUpload") + } + var r0 *models.Upload var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, io.ReadCloser, string, models.UploadType) (*models.Upload, error)); ok { diff --git a/pkg/services/mocks/UploadInformationFetcher.go b/pkg/services/mocks/UploadInformationFetcher.go index 17f3cc7ba08..9f6bbd5e121 100644 --- a/pkg/services/mocks/UploadInformationFetcher.go +++ b/pkg/services/mocks/UploadInformationFetcher.go @@ -20,6 +20,10 @@ type UploadInformationFetcher struct { func (_m *UploadInformationFetcher) FetchUploadInformation(appCtx appcontext.AppContext, _a1 uuid.UUID) (services.UploadInformation, error) { ret := _m.Called(appCtx, _a1) + if len(ret) == 0 { + panic("no return value specified for FetchUploadInformation") + } + var r0 services.UploadInformation var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (services.UploadInformation, error)); ok { @@ -44,6 +48,10 @@ func (_m *UploadInformationFetcher) FetchUploadInformation(appCtx appcontext.App func (_m *UploadInformationFetcher) FetchUploadInformationForDeletion(appCtx appcontext.AppContext, _a1 uuid.UUID, moveLocator string) (services.UploadInformation, error) { ret := _m.Called(appCtx, _a1, moveLocator) + if len(ret) == 0 { + panic("no return value specified for FetchUploadInformationForDeletion") + } + var r0 services.UploadInformation var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, string) (services.UploadInformation, error)); ok { diff --git a/pkg/services/mocks/UploadUpdater.go b/pkg/services/mocks/UploadUpdater.go index 910aa9c56c9..9f2321f23d5 100644 --- a/pkg/services/mocks/UploadUpdater.go +++ b/pkg/services/mocks/UploadUpdater.go @@ -21,6 +21,10 @@ type UploadUpdater struct { func (_m *UploadUpdater) UpdateUpload(appCtx appcontext.AppContext, file io.ReadCloser, uploadFilename string, uploadType models.UploadType) (*models.Upload, error) { ret := _m.Called(appCtx, file, uploadFilename, uploadType) + if len(ret) == 0 { + panic("no return value specified for UpdateUpload") + } + var r0 *models.Upload var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, io.ReadCloser, string, models.UploadType) (*models.Upload, error)); ok { diff --git a/pkg/services/mocks/UsPostRegionCity.go b/pkg/services/mocks/UsPostRegionCity.go index 410e7007ed7..989e7214146 100644 --- a/pkg/services/mocks/UsPostRegionCity.go +++ b/pkg/services/mocks/UsPostRegionCity.go @@ -18,6 +18,10 @@ type UsPostRegionCity struct { func (_m *UsPostRegionCity) GetLocationsByZipCity(appCtx appcontext.AppContext, search string) (*models.UsPostRegionCities, error) { ret := _m.Called(appCtx, search) + if len(ret) == 0 { + panic("no return value specified for GetLocationsByZipCity") + } + var r0 *models.UsPostRegionCities var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, string) (*models.UsPostRegionCities, error)); ok { diff --git a/pkg/services/mocks/UserFetcher.go b/pkg/services/mocks/UserFetcher.go index 81f7f74be37..8ba1704ffe1 100644 --- a/pkg/services/mocks/UserFetcher.go +++ b/pkg/services/mocks/UserFetcher.go @@ -20,6 +20,10 @@ type UserFetcher struct { func (_m *UserFetcher) FetchUser(appCtx appcontext.AppContext, filters []services.QueryFilter) (models.User, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchUser") + } + var r0 models.User var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (models.User, error)); ok { diff --git a/pkg/services/mocks/UserPrivilegeAssociator.go b/pkg/services/mocks/UserPrivilegeAssociator.go index 4f0c7118d18..20c34b7449b 100644 --- a/pkg/services/mocks/UserPrivilegeAssociator.go +++ b/pkg/services/mocks/UserPrivilegeAssociator.go @@ -20,6 +20,10 @@ type UserPrivilegeAssociator struct { func (_m *UserPrivilegeAssociator) UpdateUserPrivileges(appCtx appcontext.AppContext, userID uuid.UUID, privileges []models.PrivilegeType) ([]models.UsersPrivileges, error) { ret := _m.Called(appCtx, userID, privileges) + if len(ret) == 0 { + panic("no return value specified for UpdateUserPrivileges") + } + var r0 []models.UsersPrivileges var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, []models.PrivilegeType) ([]models.UsersPrivileges, error)); ok { diff --git a/pkg/services/mocks/UserRoleAssociator.go b/pkg/services/mocks/UserRoleAssociator.go index 2d38b218e35..2cb742ff74a 100644 --- a/pkg/services/mocks/UserRoleAssociator.go +++ b/pkg/services/mocks/UserRoleAssociator.go @@ -24,6 +24,10 @@ type UserRoleAssociator struct { func (_m *UserRoleAssociator) UpdateUserRoles(appCtx appcontext.AppContext, userID uuid.UUID, _a2 []roles.RoleType) ([]models.UsersRoles, *validate.Errors, error) { ret := _m.Called(appCtx, userID, _a2) + if len(ret) == 0 { + panic("no return value specified for UpdateUserRoles") + } + var r0 []models.UsersRoles var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/UserSessionRevocation.go b/pkg/services/mocks/UserSessionRevocation.go index 18527919698..081e1b70cc0 100644 --- a/pkg/services/mocks/UserSessionRevocation.go +++ b/pkg/services/mocks/UserSessionRevocation.go @@ -26,6 +26,10 @@ type UserSessionRevocation struct { func (_m *UserSessionRevocation) RevokeUserSession(appCtx appcontext.AppContext, id uuid.UUID, payload *adminmessages.UserUpdate, sessionManagers auth.AppSessionManagers) (*models.User, *validate.Errors, error) { ret := _m.Called(appCtx, id, payload, sessionManagers) + if len(ret) == 0 { + panic("no return value specified for RevokeUserSession") + } + var r0 *models.User var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/UserUpdater.go b/pkg/services/mocks/UserUpdater.go index 300f7ea3cb3..264673c2a89 100644 --- a/pkg/services/mocks/UserUpdater.go +++ b/pkg/services/mocks/UserUpdater.go @@ -22,6 +22,10 @@ type UserUpdater struct { func (_m *UserUpdater) UpdateUser(appCtx appcontext.AppContext, id uuid.UUID, user *models.User) (*models.User, *validate.Errors, error) { ret := _m.Called(appCtx, id, user) + if len(ret) == 0 { + panic("no return value specified for UpdateUser") + } + var r0 *models.User var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/UserUploadToPDFConverter.go b/pkg/services/mocks/UserUploadToPDFConverter.go index f1d39a47801..c6c6f0a6f0b 100644 --- a/pkg/services/mocks/UserUploadToPDFConverter.go +++ b/pkg/services/mocks/UserUploadToPDFConverter.go @@ -20,6 +20,10 @@ type UserUploadToPDFConverter struct { func (_m *UserUploadToPDFConverter) ConvertUserUploadsToPDF(appCtx appcontext.AppContext, userUploads models.UserUploads) ([]*services.FileInfo, error) { ret := _m.Called(appCtx, userUploads) + if len(ret) == 0 { + panic("no return value specified for ConvertUserUploadsToPDF") + } + var r0 []*services.FileInfo var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.UserUploads) ([]*services.FileInfo, error)); ok { diff --git a/pkg/services/mocks/WebhookSubscriptionCreator.go b/pkg/services/mocks/WebhookSubscriptionCreator.go index 2e2a2fc8f55..556b7482b9f 100644 --- a/pkg/services/mocks/WebhookSubscriptionCreator.go +++ b/pkg/services/mocks/WebhookSubscriptionCreator.go @@ -20,6 +20,10 @@ type WebhookSubscriptionCreator struct { func (_m *WebhookSubscriptionCreator) CreateWebhookSubscription(appCtx appcontext.AppContext, subscription *models.WebhookSubscription) (*models.WebhookSubscription, *validate.Errors, error) { ret := _m.Called(appCtx, subscription) + if len(ret) == 0 { + panic("no return value specified for CreateWebhookSubscription") + } + var r0 *models.WebhookSubscription var r1 *validate.Errors var r2 error diff --git a/pkg/services/mocks/WebhookSubscriptionFetcher.go b/pkg/services/mocks/WebhookSubscriptionFetcher.go index fc8631291c9..726f3f28033 100644 --- a/pkg/services/mocks/WebhookSubscriptionFetcher.go +++ b/pkg/services/mocks/WebhookSubscriptionFetcher.go @@ -20,6 +20,10 @@ type WebhookSubscriptionFetcher struct { func (_m *WebhookSubscriptionFetcher) FetchWebhookSubscription(appCtx appcontext.AppContext, filters []services.QueryFilter) (models.WebhookSubscription, error) { ret := _m.Called(appCtx, filters) + if len(ret) == 0 { + panic("no return value specified for FetchWebhookSubscription") + } + var r0 models.WebhookSubscription var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, []services.QueryFilter) (models.WebhookSubscription, error)); ok { diff --git a/pkg/services/mocks/WebhookSubscriptionUpdater.go b/pkg/services/mocks/WebhookSubscriptionUpdater.go index 3944d58e437..776caf32753 100644 --- a/pkg/services/mocks/WebhookSubscriptionUpdater.go +++ b/pkg/services/mocks/WebhookSubscriptionUpdater.go @@ -18,6 +18,10 @@ type WebhookSubscriptionUpdater struct { func (_m *WebhookSubscriptionUpdater) UpdateWebhookSubscription(appCtx appcontext.AppContext, webhooksubscription *models.WebhookSubscription, severity *int64, eTag *string) (*models.WebhookSubscription, error) { ret := _m.Called(appCtx, webhooksubscription, severity, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateWebhookSubscription") + } + var r0 *models.WebhookSubscription var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, *models.WebhookSubscription, *int64, *string) (*models.WebhookSubscription, error)); ok { diff --git a/pkg/services/mocks/WeightTicketComputer.go b/pkg/services/mocks/WeightTicketComputer.go index bfa268e5ba9..7eae7e8faf0 100644 --- a/pkg/services/mocks/WeightTicketComputer.go +++ b/pkg/services/mocks/WeightTicketComputer.go @@ -21,6 +21,10 @@ type WeightTicketComputer struct { func (_m *WeightTicketComputer) ParseWeightEstimatorExcelFile(appCtx appcontext.AppContext, file io.ReadCloser) (*services.WeightEstimatorPages, error) { ret := _m.Called(appCtx, file) + if len(ret) == 0 { + panic("no return value specified for ParseWeightEstimatorExcelFile") + } + var r0 *services.WeightEstimatorPages var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, io.ReadCloser) (*services.WeightEstimatorPages, error)); ok { diff --git a/pkg/services/mocks/WeightTicketCreator.go b/pkg/services/mocks/WeightTicketCreator.go index 6f18f24086a..6590d53422b 100644 --- a/pkg/services/mocks/WeightTicketCreator.go +++ b/pkg/services/mocks/WeightTicketCreator.go @@ -20,6 +20,10 @@ type WeightTicketCreator struct { func (_m *WeightTicketCreator) CreateWeightTicket(appCtx appcontext.AppContext, ppmShipmentID uuid.UUID) (*models.WeightTicket, error) { ret := _m.Called(appCtx, ppmShipmentID) + if len(ret) == 0 { + panic("no return value specified for CreateWeightTicket") + } + var r0 *models.WeightTicket var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.WeightTicket, error)); ok { diff --git a/pkg/services/mocks/WeightTicketDeleter.go b/pkg/services/mocks/WeightTicketDeleter.go index c363a6461a4..eedc46934ff 100644 --- a/pkg/services/mocks/WeightTicketDeleter.go +++ b/pkg/services/mocks/WeightTicketDeleter.go @@ -18,6 +18,10 @@ type WeightTicketDeleter struct { func (_m *WeightTicketDeleter) DeleteWeightTicket(appCtx appcontext.AppContext, ppmID uuid.UUID, weightTicketID uuid.UUID) error { ret := _m.Called(appCtx, ppmID, weightTicketID) + if len(ret) == 0 { + panic("no return value specified for DeleteWeightTicket") + } + var r0 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID, uuid.UUID) error); ok { r0 = rf(appCtx, ppmID, weightTicketID) diff --git a/pkg/services/mocks/WeightTicketFetcher.go b/pkg/services/mocks/WeightTicketFetcher.go index 116d980c040..5c8bbf65f97 100644 --- a/pkg/services/mocks/WeightTicketFetcher.go +++ b/pkg/services/mocks/WeightTicketFetcher.go @@ -20,6 +20,10 @@ type WeightTicketFetcher struct { func (_m *WeightTicketFetcher) GetWeightTicket(appCtx appcontext.AppContext, weightTicketID uuid.UUID) (*models.WeightTicket, error) { ret := _m.Called(appCtx, weightTicketID) + if len(ret) == 0 { + panic("no return value specified for GetWeightTicket") + } + var r0 *models.WeightTicket var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, uuid.UUID) (*models.WeightTicket, error)); ok { diff --git a/pkg/services/mocks/WeightTicketGenerator.go b/pkg/services/mocks/WeightTicketGenerator.go index 50c4704470a..b7cd5c041b5 100644 --- a/pkg/services/mocks/WeightTicketGenerator.go +++ b/pkg/services/mocks/WeightTicketGenerator.go @@ -20,6 +20,10 @@ type WeightTicketGenerator struct { func (_m *WeightTicketGenerator) FillWeightEstimatorPDFForm(PageValues services.WeightEstimatorPages, fileName string) (afero.File, *pdfcpu.PDFInfo, error) { ret := _m.Called(PageValues, fileName) + if len(ret) == 0 { + panic("no return value specified for FillWeightEstimatorPDFForm") + } + var r0 afero.File var r1 *pdfcpu.PDFInfo var r2 error diff --git a/pkg/services/mocks/WeightTicketUpdater.go b/pkg/services/mocks/WeightTicketUpdater.go index ad2c2e80c5d..6d8c183ef9a 100644 --- a/pkg/services/mocks/WeightTicketUpdater.go +++ b/pkg/services/mocks/WeightTicketUpdater.go @@ -18,6 +18,10 @@ type WeightTicketUpdater struct { func (_m *WeightTicketUpdater) UpdateWeightTicket(appCtx appcontext.AppContext, weightTicket models.WeightTicket, eTag string) (*models.WeightTicket, error) { ret := _m.Called(appCtx, weightTicket, eTag) + if len(ret) == 0 { + panic("no return value specified for UpdateWeightTicket") + } + var r0 *models.WeightTicket var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, models.WeightTicket, string) (*models.WeightTicket, error)); ok { diff --git a/pkg/services/mto_shipment/mto_shipment_creator.go b/pkg/services/mto_shipment/mto_shipment_creator.go index 5de4464d24f..68c86c04d27 100644 --- a/pkg/services/mto_shipment/mto_shipment_creator.go +++ b/pkg/services/mto_shipment/mto_shipment_creator.go @@ -446,7 +446,7 @@ func (f mtoShipmentCreator) CreateMTOShipment(appCtx appcontext.AppContext, ship func checkShipmentIDFields(shipment *models.MTOShipment, serviceItems models.MTOServiceItems) error { verrs := validate.NewErrors() - if shipment.MTOAgents != nil && len(shipment.MTOAgents) > 0 { + if len(shipment.MTOAgents) > 0 { for _, agent := range shipment.MTOAgents { if agent.ID != uuid.Nil { verrs.Add("agents:id", "cannot be set for new agents") diff --git a/pkg/services/paperwork/mocks/FileStorer.go b/pkg/services/paperwork/mocks/FileStorer.go index dbccbe9891b..0cada45f339 100644 --- a/pkg/services/paperwork/mocks/FileStorer.go +++ b/pkg/services/paperwork/mocks/FileStorer.go @@ -16,6 +16,10 @@ type FileStorer struct { func (_m *FileStorer) Create(_a0 string) (afero.File, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 afero.File var r1 error if rf, ok := ret.Get(0).(func(string) (afero.File, error)); ok { diff --git a/pkg/services/paperwork/mocks/FormFiller.go b/pkg/services/paperwork/mocks/FormFiller.go index 2e1c8c618fa..ef953b982bc 100644 --- a/pkg/services/paperwork/mocks/FormFiller.go +++ b/pkg/services/paperwork/mocks/FormFiller.go @@ -18,6 +18,10 @@ type FormFiller struct { func (_m *FormFiller) AppendPage(_a0 io.ReadSeeker, _a1 map[string]paperwork.FieldPos, _a2 interface{}) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for AppendPage") + } + var r0 error if rf, ok := ret.Get(0).(func(io.ReadSeeker, map[string]paperwork.FieldPos, interface{}) error); ok { r0 = rf(_a0, _a1, _a2) @@ -32,6 +36,10 @@ func (_m *FormFiller) AppendPage(_a0 io.ReadSeeker, _a1 map[string]paperwork.Fie func (_m *FormFiller) Output(_a0 io.Writer) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Output") + } + var r0 error if rf, ok := ret.Get(0).(func(io.Writer) error); ok { r0 = rf(_a0) diff --git a/pkg/services/ppmshipment/validation.go b/pkg/services/ppmshipment/validation.go index e32ea58bf12..5db81b9bac7 100644 --- a/pkg/services/ppmshipment/validation.go +++ b/pkg/services/ppmshipment/validation.go @@ -196,7 +196,7 @@ func mergePPMShipment(newPPMShipment models.PPMShipment, oldPPMShipment *models. ppmShipment.ExpectedDepartureDate = newPPMShipment.ExpectedDepartureDate } - if newPPMShipment.WeightTickets != nil && len(newPPMShipment.WeightTickets) >= 1 { + if len(newPPMShipment.WeightTickets) >= 1 { ppmShipment.WeightTickets = newPPMShipment.WeightTickets } diff --git a/pkg/services/pptas_report/pptas_report_list_fetcher.go b/pkg/services/pptas_report/pptas_report_list_fetcher.go index 1afbe355ce7..33f43963c58 100644 --- a/pkg/services/pptas_report/pptas_report_list_fetcher.go +++ b/pkg/services/pptas_report/pptas_report_list_fetcher.go @@ -483,6 +483,7 @@ func buildServiceItemCrate(serviceItem models.MTOServiceItem) pptasmessages.Crat var newCrateDimensions pptasmessages.MTOServiceItemDimension var newItemDimensions pptasmessages.MTOServiceItemDimension + // #nosec G115: it is unrealistic that an imperial measurement will exceed int32 limits for dimensionIndex := range serviceItem.Dimensions { if serviceItem.Dimensions[dimensionIndex].Type == "ITEM" { newItemDimensions.Type = pptasmessages.DimensionTypeITEM diff --git a/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet_test.go b/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet_test.go index f40594b7ce1..a9be036a0bb 100644 --- a/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet_test.go +++ b/pkg/services/shipment_summary_worksheet/shipment_summary_worksheet_test.go @@ -579,63 +579,6 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatValuesShipmentSumma suite.Equal("SAC", sswPage2.SAC) } -func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatValuesShipmentSummaryWorksheetFormPage3() { - yuma := factory.FetchOrBuildCurrentDutyLocation(suite.DB()) - fortGordon := factory.FetchOrBuildOrdersDutyLocation(suite.DB()) - wtgEntitlements := models.SSWMaxWeightEntitlement{} - serviceMember := models.ServiceMember{} - order := models.Order{} - expectedPickupDate := time.Date(2019, time.January, 11, 0, 0, 0, 0, time.UTC) - actualPickupDate := time.Date(2019, time.February, 11, 0, 0, 0, 0, time.UTC) - netWeight := unit.Pound(4000) - cents := unit.Cents(1000) - locator := "ABCDEF-01" - move := factory.BuildMoveWithPPMShipment(suite.DB(), nil, nil) - PPMShipment := models.PPMShipment{ - ID: move.MTOShipments[0].PPMShipment.ID, - ExpectedDepartureDate: expectedPickupDate, - ActualMoveDate: &actualPickupDate, - Status: models.PPMShipmentStatusWaitingOnCustomer, - EstimatedWeight: &netWeight, - AdvanceAmountRequested: ¢s, - Shipment: models.MTOShipment{ - ShipmentLocator: &locator, - }, - } - ssd := models.ShipmentSummaryFormData{ - AllShipments: move.MTOShipments, - ServiceMember: serviceMember, - Order: order, - CurrentDutyLocation: yuma, - NewDutyLocation: fortGordon, - PPMRemainingEntitlement: 3000, - WeightAllotment: wtgEntitlements, - PreparationDate: time.Date(2019, 1, 1, 1, 1, 1, 1, time.UTC), - PPMShipment: PPMShipment, - } - mockPPMCloseoutFetcher := &mocks.PPMCloseoutFetcher{} - sswPPMComputer := NewSSWPPMComputer(mockPPMCloseoutFetcher) - sswPage3, err := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage3(ssd, false) - suite.NoError(err) - suite.Equal(FormatDate(time.Now()), sswPage3.PreparationDate3) - suite.Equal(make(map[string]string), sswPage3.AddShipments) -} - -func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatAdditionalHHG() { - page3Map := make(map[string]string) - i := 1 - hhg := factory.BuildMTOShipment(suite.DB(), nil, nil) - locator := "ABCDEF" - hhg.ShipmentLocator = &locator - - page3Map, err := formatAdditionalHHG(page3Map, i, hhg) - suite.NoError(err) - suite.Equal(*hhg.ShipmentLocator+" HHG", page3Map["AddShipmentNumberAndTypes1"]) - suite.Equal("16-Mar-2020 Actual", page3Map["AddShipmentPickUpDates1"]) - suite.Equal("980 Actual", page3Map["AddShipmentWeights1"]) - suite.Equal(FormatEnum(string(hhg.Status), ""), page3Map["AddShipmentStatus1"]) -} - func (suite *ShipmentSummaryWorksheetServiceSuite) TestMemberPaidRemainingPPMEntitlementFormatValuesShipmentSummaryWorksheetFormPage2() { storageExpense := models.MovingExpenseReceiptTypeStorage amount := unit.Cents(10000) @@ -681,10 +624,11 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestMemberPaidRemainingPPMEnt mockPPMCloseoutFetcher := &mocks.PPMCloseoutFetcher{} sswPPMComputer := NewSSWPPMComputer(mockPPMCloseoutFetcher) sswPage2, _ := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage2(ssd, true) + suite.Equal("$4.00", sswPage2.PPMRemainingEntitlement) } -func (suite *ShipmentSummaryWorksheetServiceSuite) TestAOAPacketPPMEntitlementFormatValuesShipmentSummaryWorksheetFormPage2() { +func (suite *ShipmentSummaryWorksheetServiceSuite) TestNullCheckForFinalIncentiveAndAOAPPMEntitlementFormatValuesShipmentSummaryWorksheetFormPage2() { storageExpense := models.MovingExpenseReceiptTypeStorage amount := unit.Cents(10000) movingExpenses := models.MovingExpenses{ @@ -697,29 +641,98 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestAOAPacketPPMEntitlementFo } locator := "ABCDEF-01" - + id := uuid.Must(uuid.NewV4()) PPMShipments := []models.PPMShipment{ { - FinalIncentive: models.CentPointer(unit.Cents(500)), - AdvanceAmountReceived: models.CentPointer(unit.Cents(200)), + + ID: id, Shipment: models.MTOShipment{ ShipmentLocator: &locator, }, }, } + signedCertType := models.SignedCertificationTypeCloseoutReviewedPPMPAYMENT + cert := models.SignedCertification{ + CertificationType: &signedCertType, + CertificationText: "APPROVED", + Signature: "Firstname Lastname", + UpdatedAt: time.Now(), + PpmID: models.UUIDPointer(PPMShipments[0].ID), + } + var certs []*models.SignedCertification + certs = append(certs, &cert) + ssd := models.ShipmentSummaryFormData{ - MovingExpenses: movingExpenses, - PPMShipment: PPMShipments[0], + MovingExpenses: movingExpenses, + PPMShipment: PPMShipments[0], + SignedCertifications: certs, } mockPPMCloseoutFetcher := &mocks.PPMCloseoutFetcher{} sswPPMComputer := NewSSWPPMComputer(mockPPMCloseoutFetcher) - sswPage2, _ := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage2(ssd, false) - suite.Equal("N/A", sswPage2.PPMRemainingEntitlement) + sswPage2, _ := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage2(ssd, true) + suite.Equal("$1.00", sswPage2.PPMRemainingEntitlement) } -func (suite *ShipmentSummaryWorksheetServiceSuite) TestNullCheckForFinalIncentiveAndAOAPPMEntitlementFormatValuesShipmentSummaryWorksheetFormPage2() { +func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatValuesShipmentSummaryWorksheetFormPage3() { + yuma := factory.FetchOrBuildCurrentDutyLocation(suite.DB()) + fortGordon := factory.FetchOrBuildOrdersDutyLocation(suite.DB()) + wtgEntitlements := models.SSWMaxWeightEntitlement{} + serviceMember := models.ServiceMember{} + order := models.Order{} + expectedPickupDate := time.Date(2019, time.January, 11, 0, 0, 0, 0, time.UTC) + actualPickupDate := time.Date(2019, time.February, 11, 0, 0, 0, 0, time.UTC) + netWeight := unit.Pound(4000) + cents := unit.Cents(1000) + locator := "ABCDEF-01" + move := factory.BuildMoveWithPPMShipment(suite.DB(), nil, nil) + PPMShipment := models.PPMShipment{ + ID: move.MTOShipments[0].PPMShipment.ID, + ExpectedDepartureDate: expectedPickupDate, + ActualMoveDate: &actualPickupDate, + Status: models.PPMShipmentStatusWaitingOnCustomer, + EstimatedWeight: &netWeight, + AdvanceAmountRequested: ¢s, + Shipment: models.MTOShipment{ + ShipmentLocator: &locator, + }, + } + ssd := models.ShipmentSummaryFormData{ + AllShipments: move.MTOShipments, + ServiceMember: serviceMember, + Order: order, + CurrentDutyLocation: yuma, + NewDutyLocation: fortGordon, + PPMRemainingEntitlement: 3000, + WeightAllotment: wtgEntitlements, + PreparationDate: time.Date(2019, 1, 1, 1, 1, 1, 1, time.UTC), + PPMShipment: PPMShipment, + } + mockPPMCloseoutFetcher := &mocks.PPMCloseoutFetcher{} + sswPPMComputer := NewSSWPPMComputer(mockPPMCloseoutFetcher) + sswPage3, err := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage3(ssd, false) + suite.NoError(err) + suite.Equal(FormatDate(time.Now()), sswPage3.PreparationDate3) + suite.Equal(make(map[string]string), sswPage3.AddShipments) +} + +func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatAdditionalHHG() { + page3Map := make(map[string]string) + i := 1 + hhg := factory.BuildMTOShipment(suite.DB(), nil, nil) + locator := "ABCDEF" + hhg.ShipmentLocator = &locator + + page3Map, err := formatAdditionalHHG(page3Map, i, hhg) + suite.NoError(err) + suite.Equal(*hhg.ShipmentLocator+" HHG", page3Map["AddShipmentNumberAndTypes1"]) + suite.Equal("16-Mar-2020 Actual", page3Map["AddShipmentPickUpDates1"]) + suite.Equal("980 Actual", page3Map["AddShipmentWeights1"]) + suite.Equal(FormatEnum(string(hhg.Status), ""), page3Map["AddShipmentStatus1"]) +} + +func (suite *ShipmentSummaryWorksheetServiceSuite) TestAOAPacketPPMEntitlementFormatValuesShipmentSummaryWorksheetFormPage2() { storageExpense := models.MovingExpenseReceiptTypeStorage amount := unit.Cents(10000) movingExpenses := models.MovingExpenses{ @@ -732,38 +745,26 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestNullCheckForFinalIncentiv } locator := "ABCDEF-01" - id := uuid.Must(uuid.NewV4()) + PPMShipments := []models.PPMShipment{ { - - ID: id, + FinalIncentive: models.CentPointer(unit.Cents(500)), + AdvanceAmountReceived: models.CentPointer(unit.Cents(200)), Shipment: models.MTOShipment{ ShipmentLocator: &locator, }, }, } - signedCertType := models.SignedCertificationTypeCloseoutReviewedPPMPAYMENT - cert := models.SignedCertification{ - CertificationType: &signedCertType, - CertificationText: "APPROVED", - Signature: "Firstname Lastname", - UpdatedAt: time.Now(), - PpmID: models.UUIDPointer(PPMShipments[0].ID), - } - var certs []*models.SignedCertification - certs = append(certs, &cert) - ssd := models.ShipmentSummaryFormData{ - MovingExpenses: movingExpenses, - PPMShipment: PPMShipments[0], - SignedCertifications: certs, + MovingExpenses: movingExpenses, + PPMShipment: PPMShipments[0], } mockPPMCloseoutFetcher := &mocks.PPMCloseoutFetcher{} sswPPMComputer := NewSSWPPMComputer(mockPPMCloseoutFetcher) - sswPage2, _ := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage2(ssd, true) - suite.Equal("$1.00", sswPage2.PPMRemainingEntitlement) + sswPage2, _ := sswPPMComputer.FormatValuesShipmentSummaryWorksheetFormPage2(ssd, false) + suite.Equal("N/A", sswPage2.PPMRemainingEntitlement) } func (suite *ShipmentSummaryWorksheetServiceSuite) TestGTCCPaidRemainingPPMEntitlementFormatValuesShipmentSummaryWorksheetFormPage2() { @@ -1389,6 +1390,41 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatShipment() { } } +func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatDisbursement() { + expensesMap := make(map[string]float64) + + // Test case 1: GTCC calculation B is less than GTCC calculation A + // Additionally, Member should not be less than 0 + expectedResult := "GTCC: " + FormatDollars(100.00) + "\nMember: " + FormatDollars(0) + expensesMap["TotalGTCCPaid"] = 200.00 + expensesMap["StorageGTCCPaid"] = 300.00 + ppmRemainingEntitlement := 60.00 + expensesMap["StorageMemberPaid"] = 40.00 + result := formatDisbursement(expensesMap, ppmRemainingEntitlement) + suite.Equal(result, expectedResult) + + // Test case 2: GTCC calculation A is less than GTCC calculation B + expectedResult = "GTCC: " + FormatDollars(100.00) + "\nMember: " + FormatDollars(400.00) + expensesMap = make(map[string]float64) + expensesMap["TotalGTCCPaid"] = 60.00 + expensesMap["StorageGTCCPaid"] = 40.00 + ppmRemainingEntitlement = 300.00 + expensesMap["StorageMemberPaid"] = 200.00 + result = formatDisbursement(expensesMap, ppmRemainingEntitlement) + suite.Equal(result, expectedResult) + + // Test case 3: GTCC calculation is less than 0 + expectedResult = "GTCC: " + FormatDollars(0) + "\nMember: " + FormatDollars(-250.00) + expensesMap = make(map[string]float64) + expensesMap["TotalGTCCPaid"] = 0 + expensesMap["StorageGTCCPaid"] = 0 + ppmRemainingEntitlement = -300.00 + expensesMap["StorageMemberPaid"] = 50.00 + result = formatDisbursement(expensesMap, ppmRemainingEntitlement) + suite.Equal(result, expectedResult) + +} + func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatAdditionalShipments() { locator := "ABCDEF-01" now := time.Now() @@ -1713,38 +1749,3 @@ func (suite *ShipmentSummaryWorksheetServiceSuite) TestMissingShipmentLocatorErr _, err := formatAdditionalShipments(ssd) suite.NotNil(err) } - -func (suite *ShipmentSummaryWorksheetServiceSuite) TestFormatDisbursement() { - expensesMap := make(map[string]float64) - - // Test case 1: GTCC calculation B is less than GTCC calculation A - // Additionally, Member should not be less than 0 - expectedResult := "GTCC: " + FormatDollars(100.00) + "\nMember: " + FormatDollars(0) - expensesMap["TotalGTCCPaid"] = 200.00 - expensesMap["StorageGTCCPaid"] = 300.00 - ppmRemainingEntitlement := 60.00 - expensesMap["StorageMemberPaid"] = 40.00 - result := formatDisbursement(expensesMap, ppmRemainingEntitlement) - suite.Equal(result, expectedResult) - - // Test case 2: GTCC calculation A is less than GTCC calculation B - expectedResult = "GTCC: " + FormatDollars(100.00) + "\nMember: " + FormatDollars(400.00) - expensesMap = make(map[string]float64) - expensesMap["TotalGTCCPaid"] = 60.00 - expensesMap["StorageGTCCPaid"] = 40.00 - ppmRemainingEntitlement = 300.00 - expensesMap["StorageMemberPaid"] = 200.00 - result = formatDisbursement(expensesMap, ppmRemainingEntitlement) - suite.Equal(result, expectedResult) - - // Test case 3: GTCC calculation is less than 0 - expectedResult = "GTCC: " + FormatDollars(0) + "\nMember: " + FormatDollars(-250.00) - expensesMap = make(map[string]float64) - expensesMap["TotalGTCCPaid"] = 0 - expensesMap["StorageGTCCPaid"] = 0 - ppmRemainingEntitlement = -300.00 - expensesMap["StorageMemberPaid"] = 50.00 - result = formatDisbursement(expensesMap, ppmRemainingEntitlement) - suite.Equal(result, expectedResult) - -} diff --git a/pkg/services/sit_status/shipment_sit_status.go b/pkg/services/sit_status/shipment_sit_status.go index 4b20e072b8f..80b0a6feb02 100644 --- a/pkg/services/sit_status/shipment_sit_status.go +++ b/pkg/services/sit_status/shipment_sit_status.go @@ -264,7 +264,7 @@ func (f shipmentSITStatus) generateSITSummary(sit models.SITServiceItemGrouping, // CalculateShipmentSITStatus creates a SIT Status for payload to be used in // multiple handlers in the `ghcapi` package for the MTOShipment handlers. func (f shipmentSITStatus) CalculateShipmentSITStatus(appCtx appcontext.AppContext, shipment models.MTOShipment) (*services.SITStatus, models.MTOShipment, error) { - if shipment.MTOServiceItems == nil || len(shipment.MTOServiceItems) == 0 { + if len(shipment.MTOServiceItems) == 0 { return nil, shipment, nil } diff --git a/pkg/services/support/mocks/InternalMoveTaskOrderCreator.go b/pkg/services/support/mocks/InternalMoveTaskOrderCreator.go index 92586a3e85a..bca017c4ac2 100644 --- a/pkg/services/support/mocks/InternalMoveTaskOrderCreator.go +++ b/pkg/services/support/mocks/InternalMoveTaskOrderCreator.go @@ -20,6 +20,10 @@ type InternalMoveTaskOrderCreator struct { func (_m *InternalMoveTaskOrderCreator) InternalCreateMoveTaskOrder(appCtx appcontext.AppContext, moveTaskOrder supportmessages.MoveTaskOrder) (*models.Move, error) { ret := _m.Called(appCtx, moveTaskOrder) + if len(ret) == 0 { + panic("no return value specified for InternalCreateMoveTaskOrder") + } + var r0 *models.Move var r1 error if rf, ok := ret.Get(0).(func(appcontext.AppContext, supportmessages.MoveTaskOrder) (*models.Move, error)); ok { diff --git a/pkg/storage/mocks/FileStorer.go b/pkg/storage/mocks/FileStorer.go index 851c718b1d8..3bee53e3cdc 100644 --- a/pkg/storage/mocks/FileStorer.go +++ b/pkg/storage/mocks/FileStorer.go @@ -21,6 +21,10 @@ type FileStorer struct { func (_m *FileStorer) Delete(_a0 string) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(_a0) @@ -35,6 +39,10 @@ func (_m *FileStorer) Delete(_a0 string) error { func (_m *FileStorer) Fetch(_a0 string) (io.ReadCloser, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Fetch") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok { @@ -61,6 +69,10 @@ func (_m *FileStorer) Fetch(_a0 string) (io.ReadCloser, error) { func (_m *FileStorer) FileSystem() *afero.Afero { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FileSystem") + } + var r0 *afero.Afero if rf, ok := ret.Get(0).(func() *afero.Afero); ok { r0 = rf() @@ -77,6 +89,10 @@ func (_m *FileStorer) FileSystem() *afero.Afero { func (_m *FileStorer) PresignedURL(_a0 string, _a1 string) (string, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PresignedURL") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok { @@ -101,6 +117,10 @@ func (_m *FileStorer) PresignedURL(_a0 string, _a1 string) (string, error) { func (_m *FileStorer) Store(_a0 string, _a1 io.ReadSeeker, _a2 string, _a3 *string) (*storage.StoreResult, error) { ret := _m.Called(_a0, _a1, _a2, _a3) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 *storage.StoreResult var r1 error if rf, ok := ret.Get(0).(func(string, io.ReadSeeker, string, *string) (*storage.StoreResult, error)); ok { @@ -127,6 +147,10 @@ func (_m *FileStorer) Store(_a0 string, _a1 io.ReadSeeker, _a2 string, _a3 *stri func (_m *FileStorer) Tags(_a0 string) (map[string]string, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Tags") + } + var r0 map[string]string var r1 error if rf, ok := ret.Get(0).(func(string) (map[string]string, error)); ok { @@ -153,6 +177,10 @@ func (_m *FileStorer) Tags(_a0 string) (map[string]string, error) { func (_m *FileStorer) TempFileSystem() *afero.Afero { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TempFileSystem") + } + var r0 *afero.Afero if rf, ok := ret.Get(0).(func() *afero.Afero); ok { r0 = rf() diff --git a/pkg/unit/thousandth_inches.go b/pkg/unit/thousandth_inches.go index 73d9b239ced..edd96f07493 100644 --- a/pkg/unit/thousandth_inches.go +++ b/pkg/unit/thousandth_inches.go @@ -10,6 +10,7 @@ type ThousandthInches int // Int32Ptr returns the int32 representation of an int type. func (t ThousandthInches) Int32Ptr() *int32 { + // #nosec G115: it is unrealistic that an imperial measurement will exceed int32 limits val := int32(t) return &val }