mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-29 10:21:01 -06:00
add test provider bin for e2etest
One e2etest still requires the bin, so add that back temporarily.
This commit is contained in:
parent
29c342b020
commit
811a3a81e9
@ -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(`
|
||||
|
15
internal/legacy/builtin/bins/provider-test/main.go
Normal file
15
internal/legacy/builtin/bins/provider-test/main.go
Normal 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()
|
||||
},
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue
Block a user