Files
Shaunak KashyapandGitHub 778f7b8fe2 [fips140][configurablehttpprovider.TestFunctionalityDownloadFileHTTPS] Skip test if GODEBUG=fips140=only is set (#14076)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

When
https://github.com/open-telemetry/opentelemetry-collector/pull/13926 is
merged, all unit tests in this repository will be run with
`GODEBUG=fips140=only` to help surface any FIPS-140 violations in all
the Go modules in this repository.

One such unit test that fails in these circumstances is
`confmap/provider/internal/configurablehttpprovider.TestFunctionalityDownloadFileHTTPS`.
However, the FIPS violation surfaced by this test is from the test code
itself (as opposed to from OpenTelemetry Collector core code that the
test is exercising), specifically when this call is made:
https://github.com/open-telemetry/opentelemetry-collector/blob/e0b4b19597eff5783b52400e5f22d007edae0f00/confmap/provider/internal/configurablehttpprovider/provider_test.go#L81

As such, this is not a FIPS violation we need to worry about when
running the OpenTelemetry Collector. To prevent the unit test from
failing when it's run with `GODEBUG=fips140=only`, we skip it.

<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes #13998

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Run the `configurablehttpprovider.TestFunctionalityDownloadFileHTTPS`
unit test with `GODEBUG=fips140=only`.
   ```
   $ cd confmap/
$ GODEBUG=fips140=only go test
./provider/internal/configurablehttpprovider/... -test.v -test.run
TestFunctionalityDownloadFileHTTPS -count 1
   ```
2025-11-10 10:52:11 +00:00

19 lines
1.5 KiB
Plaintext
Generated

github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=