mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
#### 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]>
22 lines
413 B
Go
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)
|
|
}
|