Skip to content

EC restores incorrect time.Time value #3771

@End-rey

Description

@End-rey

Expected Behavior

In the new session token v2, time.Time was used for the token's lifetime. For the restored object, it is expected that the token will be restored in the same way.

Current Behavior

The lifetime field of the restored object token differs from the original one:

=== RUN   Test_Slicing_REP3/no_payload
=== RUN   Test_Slicing_REP3/no_payload/sessionv2
    service_test.go:536: 
        	Error Trace:	/neofs-node/pkg/services/object/put/service_test.go:536
        	            				/neofs-node/pkg/services/object/put/service_test.go:551
        	            				/neofs-node/pkg/services/object/put/service_test.go:366
        	Error:      	Not equal: 
        	               ...
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -3,4 +3,4 @@
        	            	   iat: (time.Time) {
        	            	-   wall: (uint64) 14002080705023339520,
        	            	-   ext: (int64) 18550458,
        	            	+   wall: (uint64) 0,
        	            	+   ext: (int64) 63903828060,
        	            	    loc: (*time.Location)({
        	            	@@ -575,4 +575,4 @@
        	            	   nbf: (time.Time) {
        	            	-   wall: (uint64) 14002080705023339520,
        	            	-   ext: (int64) 18550458,
        	            	+   wall: (uint64) 0,
        	            	+   ext: (int64) 63903828060,
        	            	    loc: (*time.Location)({
        	            	@@ -1147,4 +1147,4 @@
        	            	   exp: (time.Time) {
        	            	-   wall: (uint64) 14002119359729003520,
        	            	-   ext: (int64) 36000018550458,
        	            	+   wall: (uint64) 0,
        	            	+   ext: (int64) 63903864060,
        	            	    loc: (*time.Location)({
        	Test:       	Test_Slicing_REP3/no_payload/sessionv2
--- FAIL: Test_Slicing_REP3/no_payload/sessionv2 (0.00s)

Steps to Reproduce (for bugs)

Use #3671. Tests by path pkg/services/object/put/service_test.go, uncomment the lines under // TODO: fix Lifetime fields different and run.

Context

When testing new session tokens v2 #3671, tests with EC fail for time.Time fields.

Regression

Yes. EC is incompatible with the new v2 session tokens.

Your Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I4No visible changesS4RoutineU1Critically important to resolve quicklybugSomething isn't workingneofs-storageStorage node application issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions