cert-manager-webhook-example/main_test.go
Patrik Cyvoct 756bd769eb
Update example to lastest versions
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-11-14 14:00:17 +01:00

32 lines
742 B
Go

package main
import (
"os"
"testing"
"github.com/jetstack/cert-manager/test/acme/dns"
)
var (
zone = os.Getenv("TEST_ZONE_NAME")
)
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.
currentDir, err := os.Getwd()
if err != nil {
t.Fatalf("error getting current working dir: %s", err.Error())
}
fixture := dns.NewFixture(&customDNSProviderSolver{},
dns.SetResolvedZone(zone),
dns.SetAllowAmbientCredentials(false),
dns.SetManifestPath("testdata/my-custom-solver"),
dns.SetManifestPath(currentDir+"/testdata"),
)
fixture.RunConformance(t)
}