Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B 21474 int calculate mileage using dtod for ak oconus shipments #14550

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
90905bf
Added DTOD Selection Function, added unit tests, updates to existing …
joeydoyecaci Jan 9, 2025
6ffaf34
Merge branch 'B-21474-Main-Calculate-Mileage-Using-DTOD-For-AK-OCONUS…
joeydoyecaci Jan 9, 2025
770e553
post merge fix
joeydoyecaci Jan 9, 2025
e26dcf0
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 10, 2025
1ce224a
Merge branch 'main' into B-21474-Main-Calculate-Mileage-Using-DTOD-Fo…
joeydoyecaci Jan 10, 2025
e99f1de
Merge 'IntegrationTesting' into B-21474-INT
joeydoyecaci Jan 14, 2025
9d0d68c
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 15, 2025
d001424
Merge branch 'main' into B-21474-Main-Calculate-Mileage-Using-DTOD-Fo…
joeydoyecaci Jan 15, 2025
ee92e23
Added fix for address missing a country to determine DTOD usage
joeydoyecaci Jan 15, 2025
f3526e7
Merge branch 'B-21474-Main-Calculate-Mileage-Using-DTOD-For-AK-OCONUS…
joeydoyecaci Jan 15, 2025
cdc747c
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 15, 2025
1f9f2f5
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 15, 2025
a20ed6d
removed useDTod
joeydoyecaci Jan 16, 2025
c2e7a44
Merge branch 'main' into B-21474-Main-Calculate-Mileage-Using-DTOD-Fo…
joeydoyecaci Jan 16, 2025
8737861
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 16, 2025
c9134d7
Merge branch 'B-1474-Main into B-1474-Int
joeydoyecaci Jan 16, 2025
c08095c
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 16, 2025
eac6e10
Updated mock setup in unit tests for 'ZipTransitDistance'
joeydoyecaci Jan 16, 2025
6886cef
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 17, 2025
ffaff38
Merge branch 'B-21474-Main-Calculate-Mileage-Using-DTOD-For-AK-OCONUS…
joeydoyecaci Jan 17, 2025
65ad6ad
Fix for trailing mock assertion from ZIPTransitDistance
joeydoyecaci Jan 17, 2025
6e0f9d6
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 17, 2025
1d07351
Merge branch 'B-21474-Main-Calculate-Mileage-Using-DTOD-For-AK-OCONUS…
joeydoyecaci Jan 17, 2025
a9d31cb
Merge branch 'main' into B-21474-Main-Calculate-Mileage-Using-DTOD-Fo…
joeydoyecaci Jan 21, 2025
980dc24
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 21, 2025
13a026e
Merge branch 'B-21474-Main-Calculate-Mileage-Using-DTOD-For-AK-OCONUS…
joeydoyecaci Jan 21, 2025
2646039
Removed additional mock test failures
joeydoyecaci Jan 21, 2025
47b6432
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 21, 2025
c534928
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 21, 2025
6812e51
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 22, 2025
716ace0
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
pambecker Jan 22, 2025
c61b321
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 23, 2025
3d52dd4
Merge branch 'integrationTesting' into B-21474-INT-Calculate-Mileage-…
joeydoyecaci Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
386 changes: 382 additions & 4 deletions artifacts/accessibilityReport.html

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion pkg/handlers/adminapi/moves_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ func (suite *HandlerSuite) TestUpdateMoveHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
return UpdateMoveHandler{
suite.HandlerConfig(),
Expand Down
4 changes: 0 additions & 4 deletions pkg/handlers/ghcapi/move_task_order_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ func (suite *HandlerSuite) TestUpdateMoveTaskOrderHandlerIntegrationSuccess() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
siCreator := mtoserviceitem.NewMTOServiceItemCreator(planner, queryBuilder, moveRouter, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticPackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticShorthaulPricer(), ghcrateengine.NewDomesticOriginPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer())

Expand Down Expand Up @@ -317,7 +316,6 @@ func (suite *HandlerSuite) TestUpdateMoveTaskOrderHandlerIntegrationWithIncomple
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)

setUpSignedCertificationCreatorMock := func(returnValue ...interface{}) services.SignedCertificationCreator {
Expand Down Expand Up @@ -407,7 +405,6 @@ func (suite *HandlerSuite) TestUpdateMTOStatusServiceCounselingCompletedHandler(
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
siCreator := mtoserviceitem.NewMTOServiceItemCreator(planner, queryBuilder, moveRouter, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticPackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticShorthaulPricer(), ghcrateengine.NewDomesticOriginPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer())
handler := UpdateMTOStatusServiceCounselingCompletedHandlerFunc{
Expand Down Expand Up @@ -628,7 +625,6 @@ func (suite *HandlerSuite) TestUpdateMoveTIORemarksHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)

setUpSignedCertificationCreatorMock := func(returnValue ...interface{}) services.SignedCertificationCreator {
Expand Down
4 changes: 0 additions & 4 deletions pkg/handlers/ghcapi/mto_service_items_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ func (suite *HandlerSuite) TestUpdateMTOServiceItemStatusHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)

Expand Down Expand Up @@ -568,7 +567,6 @@ func (suite *HandlerSuite) TestUpdateMTOServiceItemStatusHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
mtoServiceItemStatusUpdater := mtoserviceitem.NewMTOServiceItemUpdater(planner, queryBuilder, moveRouter, shipmentFetcher, addressCreator, portLocationFetcher, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer())

Expand Down Expand Up @@ -631,7 +629,6 @@ func (suite *HandlerSuite) TestUpdateMTOServiceItemStatusHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
mtoServiceItemStatusUpdater := mtoserviceitem.NewMTOServiceItemUpdater(planner, queryBuilder, moveRouter, shipmentFetcher, addressCreator, portLocationFetcher, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer())

Expand Down Expand Up @@ -769,7 +766,6 @@ func (suite *HandlerSuite) TestUpdateServiceItemSitEntryDateHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)

Expand Down
21 changes: 0 additions & 21 deletions pkg/handlers/ghcapi/mto_shipment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ func (suite *HandlerSuite) TestApproveShipmentHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
approver := mtoshipment.NewShipmentApprover(
mtoshipment.NewShipmentRouter(),
Expand Down Expand Up @@ -2130,7 +2129,6 @@ func (suite *HandlerSuite) TestRequestShipmentReweighHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveRouter := moveservices.NewMoveRouter()
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)
Expand Down Expand Up @@ -2190,7 +2188,6 @@ func (suite *HandlerSuite) TestRequestShipmentReweighHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveRouter := moveservices.NewMoveRouter()
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)
Expand Down Expand Up @@ -2247,7 +2244,6 @@ func (suite *HandlerSuite) TestRequestShipmentReweighHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveRouter := moveservices.NewMoveRouter()
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)
Expand Down Expand Up @@ -2305,7 +2301,6 @@ func (suite *HandlerSuite) TestRequestShipmentReweighHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveRouter := moveservices.NewMoveRouter()
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)
Expand Down Expand Up @@ -2364,7 +2359,6 @@ func (suite *HandlerSuite) TestRequestShipmentReweighHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveRouter := moveservices.NewMoveRouter()
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)
Expand Down Expand Up @@ -2422,7 +2416,6 @@ func (suite *HandlerSuite) TestRequestShipmentReweighHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveRouter := moveservices.NewMoveRouter()
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)
Expand Down Expand Up @@ -2764,7 +2757,6 @@ func (suite *HandlerSuite) TestApproveSITExtensionHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)

Expand Down Expand Up @@ -2908,7 +2900,6 @@ func (suite *HandlerSuite) CreateApprovedSITDurationUpdate() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)

Expand Down Expand Up @@ -2993,7 +2984,6 @@ func (suite *HandlerSuite) CreateApprovedSITDurationUpdate() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)

Expand Down Expand Up @@ -3168,7 +3158,6 @@ func (suite *HandlerSuite) TestCreateMTOShipmentHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
builder,
Expand Down Expand Up @@ -3254,7 +3243,6 @@ func (suite *HandlerSuite) TestCreateMTOShipmentHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
builder,
Expand Down Expand Up @@ -3312,7 +3300,6 @@ func (suite *HandlerSuite) TestCreateMTOShipmentHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
builder,
Expand Down Expand Up @@ -3366,7 +3353,6 @@ func (suite *HandlerSuite) TestCreateMTOShipmentHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
builder,
Expand Down Expand Up @@ -3415,7 +3401,6 @@ func (suite *HandlerSuite) TestCreateMTOShipmentHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
builder,
Expand Down Expand Up @@ -3501,7 +3486,6 @@ func (suite *HandlerSuite) TestCreateMTOShipmentHandlerUsingPPM() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)

moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
Expand Down Expand Up @@ -3714,7 +3698,6 @@ func (suite *HandlerSuite) TestCreateMTOShipmentHandlerUsingPPM() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
builder,
Expand Down Expand Up @@ -3866,7 +3849,6 @@ func (suite *HandlerSuite) TestCreateMTOShipmentHandlerUsingPPM() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveTaskOrderUpdater := movetaskorder.NewMoveTaskOrderUpdater(
builder,
Expand Down Expand Up @@ -4074,7 +4056,6 @@ func (suite *HandlerSuite) TestUpdateShipmentHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
moveRouter := moveservices.NewMoveRouter()
moveWeights := moveservices.NewMoveWeights(mtoshipment.NewShipmentReweighRequester(), waf)
Expand Down Expand Up @@ -4747,7 +4728,6 @@ func (suite *HandlerSuite) TestUpdateSITServiceItemCustomerExpenseHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
updater := mtoserviceitem.NewMTOServiceItemUpdater(planner, builder, moveRouter, shipmentFetcher, addressCreator, portLocationFetcher, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer())
req := httptest.NewRequest("PATCH", fmt.Sprintf("/shipments/%s/sit-service-item/convert-to-customer-expense", approvedShipment.ID.String()), nil)
Expand Down Expand Up @@ -4825,7 +4805,6 @@ func (suite *HandlerSuite) TestUpdateSITServiceItemCustomerExpenseHandler() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)
updater := mtoserviceitem.NewMTOServiceItemUpdater(planner, builder, moveRouter, shipmentFetcher, addressCreator, portLocationFetcher, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer())
req := httptest.NewRequest("PATCH", fmt.Sprintf("/shipments/%s/sit-service-item/convert-to-customer-expense", approvedShipment.ID.String()), nil)
Expand Down
1 change: 0 additions & 1 deletion pkg/handlers/ghcapi/orders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ func (suite *HandlerSuite) TestUpdateOrderHandlerWithAmendedUploads() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)

setUpSignedCertificationCreatorMock := func(returnValue ...interface{}) services.SignedCertificationCreator {
Expand Down
3 changes: 1 addition & 2 deletions pkg/handlers/ghcapi/ppm_shipment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,7 @@ func (suite *HandlerSuite) TestGetPPMSITEstimatedCostHandler() {

ppmShipment.DestinationAddress = destinationAddress
mockedPlanner := &routemocks.Planner{}
mockedPlanner.On("ZipTransitDistance", mock.AnythingOfType("*appcontext.appContext"),
"90210", "30813", false, false).Return(2294, nil)
mockedPlanner.On("ZipTransitDistance", mock.AnythingOfType("*appcontext.appContext"), "90210", "30813", false).Return(2294, nil)
}
setupData()

Expand Down
1 change: 0 additions & 1 deletion pkg/handlers/internalapi/mto_shipment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func (suite *HandlerSuite) TestCreateMTOShipmentHandlerV1() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)

setUpSignedCertificationCreatorMock := func(returnValue ...interface{}) services.SignedCertificationCreator {
Expand Down
2 changes: 0 additions & 2 deletions pkg/handlers/primeapi/move_task_order_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,6 @@ func (suite *HandlerSuite) TestUpdateMTOPostCounselingInfo() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)

setUpSignedCertificationCreatorMock := func(returnValue ...interface{}) services.SignedCertificationCreator {
Expand Down Expand Up @@ -1822,7 +1821,6 @@ func (suite *HandlerSuite) TestUpdateMTOPostCounselingInfo() {
mock.Anything,
mock.Anything,
false,
false,
).Return(400, nil)

setUpSignedCertificationCreatorMock := func(returnValue ...interface{}) services.SignedCertificationCreator {
Expand Down
Loading
Loading