mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-30 15:00:51 +02:00
linter pass 2
This commit is contained in:
parent
e26fb04e93
commit
dda27de4f2
4 changed files with 5 additions and 5 deletions
|
@ -45,7 +45,7 @@ func NewServer(ctx context.Context, remoteClient otlptrace.Client) *ExporterServ
|
||||||
return ex
|
return ex
|
||||||
}
|
}
|
||||||
|
|
||||||
func (srv *ExporterServer) Start(ctx context.Context) {
|
func (srv *ExporterServer) Start() {
|
||||||
lis := bufconn.Listen(4096)
|
lis := bufconn.Listen(4096)
|
||||||
go func() { _ = srv.server.Serve(lis) }()
|
go func() { _ = srv.server.Serve(lis) }()
|
||||||
cc, err := grpc.NewClient("passthrough://ignore",
|
cc, err := grpc.NewClient("passthrough://ignore",
|
||||||
|
|
|
@ -72,7 +72,7 @@ func (op Options) NewContext(ctx context.Context) context.Context {
|
||||||
}
|
}
|
||||||
ctx = context.WithValue(ctx, systemContextKey, sys)
|
ctx = context.WithValue(ctx, systemContextKey, sys)
|
||||||
sys.exporterServer = NewServer(ctx, remoteClient)
|
sys.exporterServer = NewServer(ctx, remoteClient)
|
||||||
sys.exporterServer.Start(ctx)
|
sys.exporterServer.Start()
|
||||||
|
|
||||||
return ctx
|
return ctx
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ func TestOTLPTracing(t *testing.T) {
|
||||||
func TestSampling(t *testing.T) {
|
func TestSampling(t *testing.T) {
|
||||||
requireOTLPTracesEndpoint(t)
|
requireOTLPTracesEndpoint(t)
|
||||||
env := testenv.New(t, testenv.AddTraceDebugFlags(testenv.StandardTraceDebugFlags))
|
env := testenv.New(t, testenv.AddTraceDebugFlags(testenv.StandardTraceDebugFlags))
|
||||||
env.Add(testenv.ModifierFunc(func(ctx context.Context, cfg *config.Config) {
|
env.Add(testenv.ModifierFunc(func(_ context.Context, cfg *config.Config) {
|
||||||
cfg.Options.TracingSampleRate = 0.5
|
cfg.Options.TracingSampleRate = 0.5
|
||||||
}))
|
}))
|
||||||
defer env.Stop()
|
defer env.Stop()
|
||||||
|
|
|
@ -406,8 +406,8 @@ func authenticateFlow(ctx context.Context, client *http.Client, req *http.Reques
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
fs := forms.Parse(res.Body)
|
fs := forms.Parse(res.Body)
|
||||||
io.ReadAll(res.Body)
|
_, _ = io.ReadAll(res.Body)
|
||||||
res.Body.Close()
|
_ = res.Body.Close()
|
||||||
if len(fs) > 0 {
|
if len(fs) > 0 {
|
||||||
f := fs[0]
|
f := fs[0]
|
||||||
f.Inputs["email"] = email
|
f.Inputs["email"] = email
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue