IR unit tests #280

Merged
fyrchik merged 11 commits from dstepanov-yadro/frostfs-node:object-3607 into master 2023-05-02 08:48:09 +00:00

Added unit tests for processors and other IR parts.
Added interfaces to mock deps.

Added unit tests for processors and other IR parts. Added interfaces to mock deps.
dstepanov-yadro force-pushed object-3607 from f599fd7a8a to 1bcc364622 2023-04-25 09:00:10 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from df98e0bdd1 to eb09ee28d5 2023-04-26 11:30:16 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from eb09ee28d5 to 0dad65b149 2023-04-26 12:33:15 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 0dad65b149 to 1fbb919131 2023-04-26 12:33:57 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from da1124286e to 6910fda2b9 2023-04-26 14:17:15 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 6910fda2b9 to eae5fc2604 2023-04-26 14:37:30 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from eae5fc2604 to e2224981ae 2023-04-27 05:54:26 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 8bbc81b9f6 to 2c8876ac15 2023-04-27 08:40:06 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 11f00efb82 to 131440e330 2023-04-27 15:05:36 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 131440e330 to 809bc489b1 2023-04-27 15:07:18 +00:00 Compare
dstepanov-yadro changed title from WIP: IR unit tests to IR unit tests 2023-04-27 15:08:59 +00:00
dstepanov-yadro requested review from storage-core-committers 2023-04-27 15:09:05 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-04-27 15:09:05 +00:00
fyrchik reviewed 2023-04-28 10:25:54 +00:00
@ -30,3 +29,3 @@
func (cp *Processor) handleDelete(ev event.Event) {
del := ev.(containerEvent.Delete)
del := ev.(deleteEvent)
Owner

Have you considered makinf containerevent.Delete have public fields? It's just a collection of values.

Have you considered makinf `containerevent.Delete` have public fields? It's just a collection of values.
Author
Member

Fixed

Fixed
fyrchik marked this conversation as resolved
@ -0,0 +87,4 @@
counter: 100,
duration: 10,
}
r := &testEpochResetter{}
Owner

It is possible to move all this repetitive test{} and New into a single function?

It is possible to move all this repetitive `test{}` and `New` into a single function?
Author
Member

Fixed for large initialization lists.

Fixed for large initialization lists.
fyrchik marked this conversation as resolved
@ -0,0 +9,4 @@
)
func NewNetmapClient(netmapClient *netmapclient.Client) Client {
return &netmapClientWrapper{
Owner

Why do we need a wrapper?

Why do we need a wrapper?
Author
Member

To mock Morph calls.

To mock `Morph` calls.
fyrchik marked this conversation as resolved
fyrchik reviewed 2023-04-28 10:28:31 +00:00
@ -126,2 +126,4 @@
return util.Uint160DecodeStringLE(contractStr)
}
type parserMorph interface {
Owner

resolver?

`resolver`?
Author
Member

fixed

fixed
fyrchik marked this conversation as resolved
@ -0,0 +31,4 @@
}
t.Run("success", func(t *testing.T) {
key, err := keys.NewPublicKeyFromString("022bb4041c50d607ff871dec7e4cd7778388e0ea6849d84ccbd9aa8f32e16a8131")
Owner

irKeys[2]?

`irKeys[2]`?
Author
Member

fixed

fixed
fyrchik marked this conversation as resolved
dstepanov-yadro force-pushed object-3607 from 809bc489b1 to 0163f4689b 2023-04-28 10:40:18 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 0163f4689b to bb93d7db92 2023-04-28 10:46:36 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from bb93d7db92 to 14f532fad3 2023-04-28 11:05:20 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 14f532fad3 to c02dda1139 2023-04-28 11:34:37 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from c02dda1139 to ab5dd7fb0f 2023-04-28 12:40:23 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from ab5dd7fb0f to 1c7432c4e1 2023-04-28 13:00:54 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 1c7432c4e1 to bf3c080393 2023-04-28 13:04:21 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from bf3c080393 to 56928acde9 2023-04-28 13:07:36 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 56928acde9 to f83e297899 2023-04-28 13:36:30 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from f83e297899 to 0ef5b246c6 2023-04-28 13:51:46 +00:00 Compare
dstepanov-yadro force-pushed object-3607 from 0ef5b246c6 to 3d1bbce48b 2023-04-28 13:58:45 +00:00 Compare
fyrchik approved these changes 2023-05-02 07:49:03 +00:00
aarifullin approved these changes 2023-05-02 08:26:57 +00:00
aarifullin left a comment
Member

LGTM

LGTM
acid-ant approved these changes 2023-05-02 08:46:22 +00:00
fyrchik merged commit d00b1c0d29 into master 2023-05-02 08:48:09 +00:00
fyrchik referenced this pull request from a commit 2023-05-02 08:48:09 +00:00
fyrchik referenced this pull request from a commit 2023-05-02 08:48:09 +00:00
fyrchik referenced this pull request from a commit 2023-05-02 08:48:09 +00:00
fyrchik referenced this pull request from a commit 2023-05-02 08:48:10 +00:00
fyrchik referenced this pull request from a commit 2023-05-02 08:48:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#280
No description provided.