add test provider bin for e2etest

One e2etest still requires the bin, so add that back temporarily.
This commit is contained in:
James Bardin 2020-11-18 14:30:22 -05:00
parent 29c342b020
commit 811a3a81e9
2 changed files with 16 additions and 1 deletions

View File

@ -33,7 +33,7 @@ func TestProviderDevOverrides(t *testing.T) {
// such as if it stops being buildable into an independent executable.
providerExeDir := filepath.Join(tf.WorkDir(), "pkgdir")
providerExePrefix := filepath.Join(providerExeDir, "terraform-provider-test_")
providerExe := e2e.GoBuild("github.com/hashicorp/terraform/builtin/bins/provider-test", providerExePrefix)
providerExe := e2e.GoBuild("github.com/hashicorp/terraform/internal/legacy/builtin/bins/provider-test", providerExePrefix)
t.Logf("temporary provider executable is %s", providerExe)
err := ioutil.WriteFile(filepath.Join(tf.WorkDir(), "dev.tfrc"), []byte(fmt.Sprintf(`

View File

@ -0,0 +1,15 @@
package main
import (
"github.com/hashicorp/terraform/internal/legacy/builtin/providers/test"
"github.com/hashicorp/terraform/internal/legacy/terraform"
"github.com/hashicorp/terraform/plugin"
)
func main() {
plugin.Serve(&plugin.ServeOpts{
ProviderFunc: func() terraform.ResourceProvider {
return test.Provider()
},
})
}