Vasiliy Tolstov
3e9836b4de
Some checks failed
codeql / analyze (go) (pull_request) Failing after 3m2s
dependabot-automerge / automerge (pull_request) Has been skipped
prbuild / test (pull_request) Failing after 1m28s
prbuild / lint (pull_request) Failing after 2m42s
autoapprove / autoapprove (pull_request) Failing after 1m25s
automerge / automerge (pull_request) Failing after 4s
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
25 lines
462 B
Go
25 lines
462 B
Go
package vault
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"go.unistack.org/micro/v4/codec"
|
|
"go.unistack.org/micro/v4/config"
|
|
"go.unistack.org/micro/v4/options"
|
|
)
|
|
|
|
func TestInit(t *testing.T) {
|
|
c := NewConfig(
|
|
options.Context(context.TODO()),
|
|
options.Codec(codec.NewCodec()),
|
|
config.BeforeInit(func(ctx context.Context, c config.Config) error {
|
|
return c.Init(Token("tkn"), config.BeforeInit(nil))
|
|
}),
|
|
)
|
|
|
|
if err := c.Init(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|