provider_test.go 841 B

123456789101112131415161718192021222324
  1. package provider
  2. import (
  3. "testing"
  4. "github.com/hashicorp/terraform-plugin-framework/tfsdk"
  5. "github.com/hashicorp/terraform-plugin-go/tfprotov6"
  6. )
  7. // testAccProtoV6ProviderFactories are used to instantiate a provider during
  8. // acceptance testing. The factory function will be invoked for every Terraform
  9. // CLI command executed to create a provider server to which the CLI can
  10. // reattach.
  11. var testAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){
  12. "scaffolding": func() (tfprotov6.ProviderServer, error) {
  13. return tfsdk.NewProtocol6Server(New("test")()), nil
  14. },
  15. }
  16. func testAccPreCheck(t *testing.T) {
  17. // You can add code here to run prior to any test case execution, for example assertions
  18. // about the appropriate environment variables being set are common to see in a pre-check
  19. // function.
  20. }