opentofu/command/e2etest
Martin Atkins 8c928e8358 main: Consult local directories as potential mirrors of providers
This restores some of the local search directories we used to include when
searching for provider plugins in Terraform 0.12 and earlier. The
directory structures we are expecting in these are different than before,
so existing directory contents will not be compatible without
restructuring, but we need to retain support for these local directories
so that users can continue to sideload third-party provider plugins until
the explicit, first-class provider mirrors configuration (in CLI config)
is implemented, at which point users will be able to override these to
whatever directories they want.

This also includes some new search directories that are specific to the
operating system where Terraform is running, following the documented
layout conventions of that platform. In particular, this follows the
XDG Base Directory specification on Unix systems, which has been a
somewhat-common request to better support "sideloading" of packages via
standard Linux distribution package managers and other similar mechanisms.
While it isn't strictly necessary to add that now, it seems ideal to do
all of the changes to our search directory layout at once so that our
documentation about this can cleanly distinguish "0.12 and earlier" vs.
"0.13 and later", rather than having to document a complex sequence of
smaller changes.

Because this behavior is a result of the integration of package main with
package command, this behavior is verified using an e2etest rather than
a unit test. That test, TestInitProvidersVendored, is also fixed here to
create a suitable directory structure for the platform where the test is
being run. This fixes TestInitProvidersVendored.
2020-04-06 09:24:23 -07:00
..
testdata command/init: Move "vendored provider" test to e2etests 2020-04-06 09:24:23 -07:00
.gitignore command/e2etest: end-to-end testing harness 2017-07-17 14:25:33 -07:00
automation_test.go command/e2etest: Update expected output for new plugin installer 2020-04-06 09:24:23 -07:00
doc.go command/e2etest: end-to-end testing harness 2017-07-17 14:25:33 -07:00
init_test.go main: Consult local directories as potential mirrors of providers 2020-04-06 09:24:23 -07:00
main_test.go [WIP] Re-enable the end-to-end tests (#20044) 2019-04-29 13:03:24 -04:00
make-archive.sh Standardise directory name for test data 2019-06-30 10:16:15 +02:00
primary_test.go command/e2etest: Update expected output for new plugin installer 2020-04-06 09:24:23 -07:00
version_test.go command/e2etest: Update expected output for new plugin installer 2020-04-06 09:24:23 -07:00