-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprovider_test.go
40 lines (34 loc) · 997 Bytes
/
provider_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import (
"github.com/BESTSELLER/terraform-provider-servicenow-data/internal/provider"
"os"
"testing"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
var testAccProviders map[string]*schema.Provider
var testAccProvider *schema.Provider
func init() {
testAccProvider = provider.ServiceNowDataProvider()
testAccProviders = map[string]*schema.Provider{
"sericenow-data": testAccProvider,
}
}
func TestProvider(t *testing.T) {
if err := Provider().InternalValidate(); err != nil {
t.Fatalf("err: %s", err)
}
}
func TestProvider_impl(t *testing.T) {
var _ *schema.Provider = Provider()
}
func testAccPreCheck(t *testing.T) {
if err := os.Getenv("SN_API_URL"); err == "" {
t.Fatal("SN_API_URL must be set for acceptance tests")
}
if err := os.Getenv("SN_API_USER"); err == "" {
t.Fatal("SN_API_USER must be set for acceptance tests")
}
if err := os.Getenv("SN_API_PASS"); err == "" {
t.Fatal("SN_API_PASS must be set for acceptance tests")
}
}