-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate from otelcoltest.LoadConfigAndValidate
to otelcoltest.LoadConfigAndValidateWithSettings
#33594
Comments
Is there a better way to migrate than changing the following? - _, err = otelcoltest.LoadConfigAndValidateWithSettings(filepath.Join("testdata", test.file), factories)
- require.ErrorContains(t, err, test.contains)
+ cfg, err := otelcoltest.LoadConfigWithSettings(factories, otelcol.ConfigProviderSettings{
+ ResolverSettings: confmap.ResolverSettings{
+ URIs: []string{filepath.Join("testdata", test.file)},
+ ProviderFactories: []confmap.ProviderFactory{
+ fileprovider.NewFactory(),
+ envprovider.NewFactory(),
+ yamlprovider.NewFactory(),
+ httpprovider.NewFactory(),
+ },
+ ConverterFactories: []confmap.ConverterFactory{expandconverter.NewFactory()},
+ },
+ })
+ require.NoError(t, err)
+ require.ErrorContains(t, cfg.Validate(), test.contains) |
As part of open-telemetry/opentelemetry-collector#10290 we're trying to get providers and converters out of To unblock the release I see 3 options.
|
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Component(s)
No response
Describe the issue you're reporting
otelcoltest.LoadConfigAndValidate
is deprecated in favor ofotelcoltest.LoadConfigAndValidateWithSettings
in the latest core.The text was updated successfully, but these errors were encountered: