-
Notifications
You must be signed in to change notification settings - Fork 35
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
Int b 22693 #14957
base: integrationTesting
Are you sure you want to change the base?
Int b 22693 #14957
Conversation
pkg/services/acknowledge_moves_shipments/move_shipment_acknowledgement_updater_test.go
Outdated
Show resolved
Hide resolved
suite.Assertions.IsType(&movetaskorderops.AcknowledgeMovesAndShipmentsOK{}, handlerResponse) | ||
}) | ||
|
||
suite.Run("Unsuccessful Acknowledge Moves and Shipments - 200", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) 200->500 (internal server error)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to the correct http code.
return movetaskorderops.NewAcknowledgeMovesAndShipmentsInternalServerError(), err | ||
} | ||
responsePayload := &primemessages.AcknowledgeMovesShipmentsSuccessResponse{ | ||
Message: "Successfully updated acknowledgement for moves and shipments", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) can check the message on tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a check to validate the success message.
} | ||
moves, verrs := payloads.MovesModelFromAcknowledgeMovesAndShipments(&payload) | ||
if verrs != nil && verrs.HasAny() { | ||
return movetaskorderops.NewAcknowledgeMovesAndShipmentsUnprocessableEntity().WithPayload(payloads.ValidationError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) can check the unprocessable type on tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not as minor as you thought. I added the test, but realized I wasn't properly returning this error in the case of a bad payload. Good catch 🙇 Should be good to go now.
@@ -1118,6 +1118,72 @@ func (suite *MTOServiceItemServiceSuite) TestUpdateMTOServiceItemData() { | |||
} | |||
}) | |||
|
|||
suite.Run("SITDepartureDate - Does not error or update shipment auth end date when set after the authorized end date - international", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here I was attempting to fix that failure 😞 I'll take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this test was essentially duplicated on main, but not on int. Somehow after removing the duplicate from my main B branch it got added back to my INT-B branch 😕 I removed it from this branch only as it doesn't exists on my main one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failing server test
…void any lingering possible issue with storybook
…m/mymove into B-22814-EnvVariableTests
B-22652 MAIN: UB Weight Restriction Email Updates
change to env variables for bypass if needed; unset aws env; fix whitespace; change needs to include now passing/req'd tests; change some images to use harbor proxy vs docker to avoid rate limit
swagger/prime.yaml
Outdated
schema: | ||
$ref: '#/definitions/AcknowledgeMovesShipmentsSuccessResponse' | ||
'401': | ||
$ref: '#/responses/PermissionDenied' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're only handling unprocessable, error and ok. could you include some checks for these other responses if they might be needed or you could just remove them from here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I removed them here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some little things
// NewPortLocationFetcher returns a new port location fetcher | ||
func NewMoveAndShipmentAcknowledgementUpdater() services.MoveAndShipmentAcknowledgementUpdater { | ||
return &moveAndShipmentAcknowledgementUpdater{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a copy pasta thang here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in here.
AcknowledgeShipment: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
format: uuid | ||
example: 1f2270c7-7166-40ae-981e-b200ebdf3054 | ||
primeAcknowledgedAt: | ||
type: string | ||
format: date-time | ||
example: 2025-04-13T14:15:33Z | ||
|
||
AcknowledgeMove: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
format: uuid | ||
example: a502b4f1-b9c4-4faf-8bdd-68292501bf26 | ||
primeAcknowledgedAt: | ||
type: string | ||
format: date-time | ||
example: 2025-04-13T14:15:22Z | ||
mtoShipments: | ||
type: array | ||
items: | ||
$ref: '#/definitions/AcknowledgeShipment' | ||
|
||
AcknowledgeMoves: | ||
type: array | ||
items: | ||
$ref: '#/definitions/AcknowledgeMove' | ||
|
||
AcknowledgeMovesShipmentsSuccessResponse: | ||
type: object | ||
properties: | ||
message: | ||
type: string | ||
example: 'Moves/Shipments acknowledgement successfully completed' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you break these up into their own .yaml
files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So having an AcknowledgeShipment.yaml
, AcknowledgeMove.yaml
, AcknowledgeMoves.yaml
and AcknowledgeMovesShipmentsSuccessResponse.yaml
This keeps up with how we have things currently here in the definitions folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking was that they weren't going to be terribly reusable, so maybe keep them together. But I also don't think it would hurt to break them up for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got those separated out in here.
Agility ticket
Summary
In B-22692 we added a new DB procedure for populating the
prime_acknowledge_at
columns on themoves
andshipments
table. In this story we are adding a new endpointprime/v1/move-task-orders/acknowledge
to the prime API. This endpoint allows the prime to send the move/shipment data with theprimeAcknowledgedAt
values, and we will then pass that to our DB procedure to save those values.Verification Steps for the Author
These are to be checked by the author.
Verification Steps for Reviewers
These are to be checked by a reviewer.
How to test
acknowledgeMovesAndShipments
endpoint and click Try it out.select m.id as move_id, ms.id as shipment_id, m.prime_acknowledged_at as move_prime_acknowledged_at, ms.prime_acknowledged_at as shipment_prime_acknowledged_at from moves m join mto_shipments ms on m.id = ms.move_id;
Backend
Database
Any new migrations/schema changes:
Screenshots