terraform/internal/getproviders
Sarah French 9f5f21f1d8
test: Enable mocking http provider sources in tests (#38206)
* test: Update`MockSource` to be able to present providers as being installed via HTTP, add `newMockProviderSourceViaHTTP` for direct use in tests.

Compare newMockProviderSourceViaHTTP to the existing newMockProviderSource. newMockProviderSource uses FakeInstallablePackageMeta, which creates metadata for providers that says it's being sourced from a local archive. In newMockProviderSourceViaHTTP the metadata reports the provider is downloaded via HTTP. The URL is created using a base URL that should be obtained from a test http server created in the test.

* test: Add `newMockProviderSourceUsingTestHttpServer` helper, to abstract away making the http test server. Add test showing it in use.

* refactor: Update test helpers to call t.Cleanup internally
2026-02-26 10:24:13 +00:00
..
providerreqs make copyrightfix 2026-02-17 13:56:34 +00:00
reattach make copyrightfix 2026-02-17 13:56:34 +00:00
testdata internal/getproviders: Allow basedir for local search to be symlink 2020-08-18 14:28:50 -07:00
didyoumean.go make copyrightfix 2026-02-17 13:56:34 +00:00
didyoumean_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
doc.go make copyrightfix 2026-02-17 13:56:34 +00:00
errors.go make copyrightfix 2026-02-17 13:56:34 +00:00
filesystem_mirror_source.go make copyrightfix 2026-02-17 13:56:34 +00:00
filesystem_mirror_source_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
filesystem_search.go make copyrightfix 2026-02-17 13:56:34 +00:00
filesystem_search_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
hanging_source.go make copyrightfix 2026-02-17 13:56:34 +00:00
hash.go make copyrightfix 2026-02-17 13:56:34 +00:00
http_mirror_source.go make copyrightfix 2026-02-17 13:56:34 +00:00
http_mirror_source_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
memoize_source.go make copyrightfix 2026-02-17 13:56:34 +00:00
memoize_source_test.go test: Enable mocking http provider sources in tests (#38206) 2026-02-26 10:24:13 +00:00
mock_source.go test: Enable mocking http provider sources in tests (#38206) 2026-02-26 10:24:13 +00:00
multi_source.go make copyrightfix 2026-02-17 13:56:34 +00:00
multi_source_test.go test: Enable mocking http provider sources in tests (#38206) 2026-02-26 10:24:13 +00:00
package_authentication.go make copyrightfix 2026-02-17 13:56:34 +00:00
package_authentication_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
public_keys.go make copyrightfix 2026-02-17 13:56:34 +00:00
registry_client.go make copyrightfix 2026-02-17 13:56:34 +00:00
registry_client_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
registry_source.go make copyrightfix 2026-02-17 13:56:34 +00:00
registry_source_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
source.go make copyrightfix 2026-02-17 13:56:34 +00:00
types.go make copyrightfix 2026-02-17 13:56:34 +00:00
types_test.go make copyrightfix 2026-02-17 13:56:34 +00:00