github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/internal/secret/token_test.go (about) 1 package secret 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/require" 7 ) 8 9 func TestToken(t *testing.T) { 10 for _, tt := range []struct { 11 token string 12 exp string 13 }{ 14 { 15 token: "t1.9euelZqOnJiKlcuPzciQyJjNyZ6OzO3rnpWaj53JlZKcy8aTyoyYm8-Uz8ABguCyAUPnxXz391GzzByWXoOxBT7krgydRAkaqyL7G4VVZCQDN1lZ8Lxk_sKbBMpbRn51r8dxNJNzr80ai5AQ", //nolint:lll 16 exp: "t1.9****i5AQ(CRC-32c: B83EA6E4)", 17 }, 18 } { 19 t.Run("", func(t *testing.T) { 20 require.Equal(t, tt.exp, Token(tt.token)) 21 }) 22 } 23 }