Skip to content

Commit 6ed327d

Browse files
committed
fix failing tests
1 parent 079bfa9 commit 6ed327d

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

main.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"fmt"
5+
"github.com/cert-manager/cert-manager/pkg/acme/webhook"
56
"strconv"
67
"strings"
78

@@ -28,6 +29,16 @@ type designateDNSProviderSolver struct {
2829
client *gophercloud.ServiceClient
2930
}
3031

32+
func New() webhook.Solver {
33+
client, err := createDesignateServiceClient()
34+
if err != nil {
35+
panic(fmt.Errorf("%v", err))
36+
}
37+
return &designateDNSProviderSolver{
38+
client: client,
39+
}
40+
}
41+
3142
func (c *designateDNSProviderSolver) Name() string {
3243
return "designateDNS"
3344
}

main_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ func TestRunsSuite(t *testing.T) {
1616
// snippet of valid configuration that should be included on the
1717
// ChallengeRequest passed as part of the test cases.
1818

19-
fixture := dns.NewFixture(&designateDNSProviderSolver{},
19+
solver := New()
20+
fixture := dns.NewFixture(solver,
2021
dns.SetResolvedZone(zone),
2122
dns.SetAllowAmbientCredentials(false),
2223
dns.SetManifestPath("testdata/my-custom-solver"),
2324
)
2425

25-
fixture.RunConformance(t)
26+
fixture.RunBasic(t)
27+
fixture.RunExtended(t)
2628
}

0 commit comments

Comments
 (0)