terraform/internal/getproviders
Martin Atkins 531de52dff internal/getproviders: MockSource and mock package metadata
These are some helpers to support unit testing in other packages, allowing
callers to exercise provider installation mechanisms without hitting any
real upstream source or having to prepare local package directories.

MockSource is a Source implementation that just scans over a provided
static list of packages and returns whatever matches.

FakePackageMeta is a shorthand for concisely constructing a
realistic-looking but uninstallable PackageMeta, probably for use with
MockSource.

FakeInstallablePackageMeta is similar to FakePackageMeta but also goes to
the trouble of creating a real temporary archive on local disk so that
the resulting package meta is pointing to something real on disk. This
makes the result more useful to the caller, but in return they get the
responsibility to clean up the temporary file once the test is over.

Nothing is using these yet.
2020-04-06 09:24:23 -07:00
..
testdata/filesystem-mirror internal/getproviders: Initial implementation of FilesystemMirrorSource 2020-02-25 10:30:03 -05:00
doc.go internal/getproviders: Query a provider registry 2020-01-10 09:41:27 -08:00
errors.go internal/getproviders: Query a provider registry 2020-01-10 09:41:27 -08:00
filesystem_mirror_source.go internal/getproviders: Make local directory search a public API 2020-03-25 11:29:48 -07:00
filesystem_mirror_source_test.go internal/getproviders: Initial implementation of FilesystemMirrorSource 2020-02-25 10:30:03 -05:00
filesystem_search.go internal/getproviders: SearchLocalDirectory can handle symlinks 2020-03-25 13:50:00 -07:00
http_mirror_source.go internal/getproviders: Stub out the two mirror sources 2020-01-10 09:41:27 -08:00
legacy_lookup.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
legacy_lookup_test.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
memoize_source.go internal/getproviders: MemoizeSource for local caching of source responses 2020-01-10 09:41:27 -08:00
mock_source.go internal/getproviders: MockSource and mock package metadata 2020-04-06 09:24:23 -07:00
multi_source.go internal/getproviders: Exit early if MultiSource has no sources 2020-03-25 11:29:48 -07:00
registry_client.go internal/getproviders: Include Provider and Version in PackageMeta 2020-02-25 10:30:03 -05:00
registry_client_test.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
registry_source.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
registry_source_test.go build: Use Go 1.14 2020-03-04 13:26:50 -08:00
source.go internal/getproviders: Source interface for generalization 2020-01-10 09:41:27 -08:00
types.go internal/getproviders: A new shared model for provider requirements 2020-03-27 09:01:32 -07:00