-
Notifications
You must be signed in to change notification settings - Fork 23
/
provider_test.go
43 lines (36 loc) · 1006 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
41
42
43
package main
import (
"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()
testAccProviders = map[string]*schema.Provider{
"alks": testAccProvider,
}
}
func TestProvider(t *testing.T) {
if err := Provider().InternalValidate(); err != nil {
t.Fatalf("Error: %s", err)
}
}
func TestProvider_impl(t *testing.T) {
var _ = Provider()
}
func testAccPreCheck(t *testing.T) {
if v := os.Getenv("ALKS_URL"); v == "" {
t.Fatal("ALKS_URL must be set for acceptance tests")
}
if v := os.Getenv("AWS_ACCESS_KEY_ID"); v == "" {
t.Fatal("AWS_ACCESS_KEY_ID must be set for acceptance tests")
}
if v := os.Getenv("AWS_SECRET_ACCESS_KEY"); v == "" {
t.Fatal("AWS_SECRET_ACCESS_KEY must be set for acceptance tests")
}
if v := os.Getenv("AWS_SESSION_TOKEN"); v == "" {
t.Fatal("AWS_SESSION_TOKEN must be set for acceptance tests")
}
}