Skip to content

Commit adca11a

Browse files
authored
[chore][configtls] Add goleak test via metadata.yaml (#15632)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Adds `metadata.yaml` to `configtls` and add `goleak` configuration. <!-- Issue number if applicable --> #### Link to tracking issue Updates #9221 <!--Authorship attestation. See AGENTS.md for details. AI agents must not check this box on behalf of the user; the human author must check it themselves before the PR is ready for review.--> #### Authorship - [x] I, a human, wrote this pull request description myself. <!--Please delete paragraphs that you did not use before submitting.-->
1 parent bc198f4 commit adca11a

5 files changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/utils/cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@
288288
"incorrectclass",
289289
"incorrectcomponent",
290290
"incorrectstability",
291+
"inotify",
291292
"instrgen",
292293
"internaldata",
293294
"ints",

config/configtls/doc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
// Package configtls implements the TLS settings to load and
55
// configure TLS clients and servers.
66
package configtls // import "go.opentelemetry.io/collector/config/configtls"
7+
8+
//go:generate mdatagen metadata.yaml

config/configtls/generated_package_test.go

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/configtls/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ require (
1010
go.opentelemetry.io/collector/config/configopaque v1.63.0
1111
go.opentelemetry.io/collector/confmap v1.63.0
1212
go.opentelemetry.io/collector/internal/testutil v0.157.0
13+
go.uber.org/goleak v1.3.0
1314
)
1415

1516
require (

config/configtls/metadata.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,14 @@ github_project: open-telemetry/opentelemetry-collector
55
status:
66
disable_codecov_badge: true
77
class: pkg
8+
9+
tests:
10+
goleak:
11+
ignore:
12+
top:
13+
# https://github.com/open-telemetry/opentelemetry-collector/issues/9221
14+
- "go.opentelemetry.io/collector/config/configtls.(*clientCAsFileReloader).handleWatcherEvents"
15+
any:
16+
# https://github.com/open-telemetry/opentelemetry-collector/issues/9221
17+
- "github.com/fsnotify/fsnotify.(*inotify).readEvents"
18+
- "github.com/fsnotify/fsnotify.(*readDirChangesW).readEvents"

0 commit comments

Comments
 (0)