-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathmain_test.go
45 lines (35 loc) · 1.08 KB
/
main_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
44
45
package main
import (
"os"
"testing"
"time"
"github.com/cert-manager/cert-manager/test/acme"
)
var (
zone = os.Getenv("TEST_ZONE_NAME")
dnsServer = os.Getenv("TEST_DNS_SERVER")
)
func TestRunsSuite(t *testing.T) {
// The manifest path should contain a file named config.json that is a
// snippet of valid configuration that should be included on the
// ChallengeRequest passed as part of the test cases.
pollTime, _ := time.ParseDuration("5s")
timeOut, _ := time.ParseDuration("3m")
if dnsServer == "" {
dnsServer = "1.1.1.1:53"
}
fixture := dns.NewFixture(&godaddyDNSSolver{},
dns.SetResolvedZone(zone),
dns.SetAllowAmbientCredentials(false),
dns.SetManifestPath("testdata/godaddy"),
dns.SetDNSServer(dnsServer),
dns.SetUseAuthoritative(false),
// Disable the extended test as godaddy do not support to create several records for the same Record DNS Name !!
dns.SetStrict(false),
// Increase the poll interval to 10s
dns.SetPollInterval(pollTime),
// Increase the limit from 2 min to 5 min
dns.SetPropagationLimit(timeOut),
)
fixture.RunConformance(t)
}