Files
d8c5fddf6e [confighttp, configgrpc] Replace host parameter by map of extensions (#14190)
#### Description

Alternative to #14162, where we make the map of extensions a mandatory
positional parameter to replace `host` instead of an option.

#### Link to tracking issue
Fixes #13640

#### Testing
Existing tests make extensive use of the modified functions

#### Documentation
Added line in ToServer/ToClient(Conn) documentation describing the
intended use of the extensions parameter.

---------

Co-authored-by: Pablo Baeyens <[email protected]>
Co-authored-by: Pablo Baeyens <[email protected]>
2025-11-27 08:54:41 +00:00

22 lines
413 B
Go

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package componenttest
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNewNopHost(t *testing.T) {
nh := NewNopHost()
require.NotNil(t, nh)
require.IsType(t, &nopHost{}, nh)
extensions := nh.GetExtensions()
assert.NotNil(t, extensions)
assert.Empty(t, extensions)
}