Skip to content

Commit

Permalink
Fix session module keys test file
Browse files Browse the repository at this point in the history
  • Loading branch information
bsrinivas8687 committed Mar 13, 2022
1 parent 91ec2e3 commit ae44a1d
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions x/session/types/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,56 +59,6 @@ func TestIDFromStatusSessionAtKey(t *testing.T) {
}
}

func TestIDFromSessionForNodeKey(t *testing.T) {
var (
key []byte
)

for i := 0; i < 60; i++ {
key = make([]byte, i)
_, _ = rand.Read(key)

if i == 29 {
require.Equal(
t,
sdk.BigEndianToUint64(key[21:]),
IDFromSessionForNodeKey(key),
)

continue
}

require.Panics(t, func() {
IDFromSessionForNodeKey(key)
})
}
}

func TestIDFromSessionForSubscriptionKey(t *testing.T) {
var (
key []byte
)

for i := 0; i < 60; i++ {
key = make([]byte, i)
_, _ = rand.Read(key)

if i == 17 {
require.Equal(
t,
sdk.BigEndianToUint64(key[9:]),
IDFromSessionForSubscriptionKey(key),
)

continue
}

require.Panics(t, func() {
IDFromSessionForSubscriptionKey(key)
})
}
}

func TestIDFromStatusSessionForAddressKey(t *testing.T) {
var (
key []byte
Expand Down

0 comments on commit ae44a1d

Please sign in to comment.