mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-02 12:17:39 -06:00
7e9c850936
* Terraform ProfitBricks Builder * make fmt * Merge remote-tracking branch 'upstream/master' into terraform-provider-profitbricks # Conflicts: # command/internal_plugin_list.go * Addressing PR remarks * Removed importers
40 lines
926 B
Go
40 lines
926 B
Go
package profitbricks
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/schema"
|
|
"github.com/hashicorp/terraform/terraform"
|
|
)
|
|
|
|
var testAccProviders map[string]terraform.ResourceProvider
|
|
var testAccProvider *schema.Provider
|
|
|
|
func init() {
|
|
testAccProvider = Provider().(*schema.Provider)
|
|
testAccProviders = map[string]terraform.ResourceProvider{
|
|
"profitbricks": testAccProvider,
|
|
}
|
|
}
|
|
|
|
func TestProvider(t *testing.T) {
|
|
if err := Provider().(*schema.Provider).InternalValidate(); err != nil {
|
|
t.Fatalf("err: %s", err)
|
|
}
|
|
}
|
|
|
|
func TestProvider_impl(t *testing.T) {
|
|
var _ terraform.ResourceProvider = Provider()
|
|
}
|
|
|
|
func testAccPreCheck(t *testing.T) {
|
|
if v := os.Getenv("PROFITBRICKS_USERNAME"); v == "" {
|
|
t.Fatal("PROFITBRICKS_USERNAME must be set for acceptance tests")
|
|
}
|
|
|
|
if v := os.Getenv("PROFITBRICKS_PASSWORD"); v == "" {
|
|
t.Fatal("PROFITBRICKS_PASSWORD must be set for acceptance tests")
|
|
}
|
|
}
|