Skip to content

Commit

Permalink
session/test: "generate" valid session tokens
Browse files Browse the repository at this point in the history
Chronology was broken for lifetime values (created already expired).

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Jul 30, 2024
1 parent 35cabdd commit 0f82848
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions session/test/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ func Container() session.Container {
tok.ApplyOnlyTo(cidtest.ID())
tok.SetID(uuid.New())
tok.SetAuthKey((*neofsecdsa.PublicKey)(&priv.PublicKey))
tok.SetExp(11)
tok.SetIat(11)

Check warning on line 31 in session/test/session.go

View check run for this annotation

Codecov / codecov/patch

session/test/session.go#L31

Added line #L31 was not covered by tests
tok.SetNbf(22)
tok.SetIat(33)
tok.SetExp(33)

Check warning on line 33 in session/test/session.go

View check run for this annotation

Codecov / codecov/patch

session/test/session.go#L33

Added line #L33 was not covered by tests

return tok
}
Expand Down Expand Up @@ -65,9 +65,9 @@ func Object() session.Object {
tok.LimitByObjects(oidtest.ID(), oidtest.ID())
tok.SetID(uuid.New())
tok.SetAuthKey((*neofsecdsa.PublicKey)(&priv.PublicKey))
tok.SetExp(11)
tok.SetIat(11)
tok.SetNbf(22)
tok.SetIat(33)
tok.SetExp(33)

return tok
}
Expand Down

0 comments on commit 0f82848

Please sign in to comment.