[#44] add tracing support refactoring
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
This commit is contained in:
parent
8a22991326
commit
cdaab4feab
9 changed files with 78 additions and 137 deletions
|
@ -3,6 +3,7 @@
|
|||
package tokens
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"testing"
|
||||
|
||||
|
@ -153,10 +154,11 @@ func Test_checkAndPropagateBearerToken(t *testing.T) {
|
|||
ctx := makeTestRequest(t64, "")
|
||||
|
||||
// Expect to see the token within the context.
|
||||
require.NoError(t, StoreBearerToken(ctx))
|
||||
appCtx, err := StoreBearerTokenAppCtx(ctx, context.Background())
|
||||
require.NoError(t, err)
|
||||
|
||||
// Expect to see the same token without errors.
|
||||
actual, err := LoadBearerToken(ctx)
|
||||
actual, err := LoadBearerToken(appCtx)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, tkn, actual)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue