Files
Pablo BaeyensandGitHub 39c3b1d927 [extensionauth,configauth] Remove deprecated symbols (#12672)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Removes deprecated symbols from `extensionauth` and `configauth` modules

<!-- Issue number if applicable -->
#### Link to tracking issue
Follows #12574
2025-03-19 14:49:47 +00:00

26 lines
572 B
Go

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package extensionauth
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestServerAuthenticateFunc(t *testing.T) {
var called bool
var server Server = ServerAuthenticateFunc(func(ctx context.Context, _ map[string][]string) (context.Context, error) {
called = true
return ctx, nil
})
ctx, err := server.Authenticate(context.Background(), nil)
require.NoError(t, err)
assert.True(t, called)
assert.NotNil(t, ctx)
}