Skip to content

Commit

Permalink
test: add helper acctest package
Browse files Browse the repository at this point in the history
  • Loading branch information
d-strobel committed Sep 26, 2024
1 parent 42ca5ac commit c75d32d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions internal/acctest/acctest.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package acctest

import (
"github.com/d-strobel/terraform-provider-windows/internal/provider"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
)

// TestAccProtoV6ProviderFactories are used to instantiate a provider during acceptance testing.
var TestAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){
"windows": providerserver.NewProtocol6WithError(provider.New("test")()),
}

// ProviderConfig returns a provider configuration for use in acceptance tests.
func ProviderConfig() string {
return `
provider "windows" {
endpoint = "127.0.0.1"
winrm = {
username = "vagrant"
password = "vagrant"
port = 15985
insecure = true
use_tls = false
}
}
`
}

0 comments on commit c75d32d

Please sign in to comment.