-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add unit tests for package_.CreatePreservationTask()
#901
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #901 +/- ##
==========================================
+ Coverage 47.11% 48.00% +0.88%
==========================================
Files 96 101 +5
Lines 5383 5402 +19
==========================================
+ Hits 2536 2593 +57
+ Misses 2611 2571 -40
- Partials 236 238 +2 ☔ View full report in Codecov by Sentry. |
8e9a086
to
4420aa2
Compare
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.
LGTM
4420aa2
to
780d2d1
Compare
- Make the ent preservation_action `StartedAt` and `CompletedAt` columns nullable - Make the ent preservation_task `StartedAt` and `CompletedAt` columns nullable
Split ent client package methods into a separate `package` file.
- Move `package_.PreservationTask` struct to `datatypes.PreservationTask` to avoid circular imports - Move PreservationTask enums to the `enums` package to avoid circular imports
- Move PreservationAction struct to `datatypes` package - Move PreservationAction enums to `enums` package
I originally intended the eventManager wrapper as layer to compose the event and persistence services. With the switch to including the persistence service in the package service, it is less work to compose the event and persistence services in the package service and doesn't require a separate service.
- Add `CreatePreservationTask()` to the ent client - Add `CreatePreservationTask()` to the persistence service - Regenerate the persistence service mocks - Add a `convertPreservationTask()` function to convert a `db.PreservationTask` to a `datatype.PreservationTask` struct
Fixes #900 - Use `persistence.CreatePreservationTask()` instead of a SQL query in the package service - Add a `preservationTaskToGoa()` function to convert `datatypes.PreservationTask` to a Goa `EnduroPackagePreservationTask` struct [skip codecov]
780d2d1
to
9ac3b10
Compare
[skip codecov]
Fixes #900
persistence.CreatePreservationTask()
method, and add an implementation to the ent clientpersistence.CreatePreservationTask()
frompackage_.CreatePreservationTask()
instead of using direct SQL queriespersistence.eventManager
service wrapper