mirror of
https://github.com/cert-manager/webhook-example.git
synced 2026-03-16 18:02:51 +01:00
Apply review feedback: fix variable shadowing, use TEST_ZONE_NAME env var, fix README typos and solverName
Co-authored-by: pr0ton11 <4889380+pr0ton11@users.noreply.github.com>
This commit is contained in:
parent
4900f0651f
commit
bb6c67c8ec
2 changed files with 13 additions and 8 deletions
10
README.md
10
README.md
|
|
@ -9,10 +9,10 @@
|
|||
This solver can be used with [desec.io](https://desec.io) DNS API. The documentation of the API can be found [here](https://desec.readthedocs.io/en/latest/)
|
||||
|
||||
## Requirements
|
||||
- [go](https://golang.org) => 1.26.0
|
||||
- [go](https://golang.org) >= 1.26.0
|
||||
- [helm](https://helm.sh/) >= v3.0.0
|
||||
- [kuberentes](https://kubernetes.io/) => 1.25.0
|
||||
- [cert-manager](https://cert-manager.io/) => 1.19.0
|
||||
- [kubernetes](https://kubernetes.io/) >= 1.25.0
|
||||
- [cert-manager](https://cert-manager.io/) >= 1.19.0
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ spec:
|
|||
key: token
|
||||
name: desec-io-token
|
||||
groupName: acme.pr0ton11.github.com
|
||||
solverName: desec
|
||||
solverName: deSEC
|
||||
```
|
||||
|
||||
## Create a manual certificate
|
||||
|
|
@ -150,7 +150,7 @@ data:
|
|||
type: Opaque
|
||||
```
|
||||
|
||||
Define a **TEST_ZONE_NAME** matching to your authenticaton creditials.
|
||||
Define a **TEST_ZONE_NAME** matching to your authentication credentials.
|
||||
|
||||
```bash
|
||||
$ TEST_ZONE_NAME=example.com. make test
|
||||
|
|
|
|||
11
main_test.go
11
main_test.go
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
acmetest "github.com/cert-manager/cert-manager/test/acme"
|
||||
|
|
@ -21,9 +22,13 @@ func TestRunsSuite(t *testing.T) {
|
|||
// acmetest.SetManifestPath("testdata/my-custom-solver"),
|
||||
// acmetest.SetBinariesPath("_test/kubebuilder/bin"),
|
||||
//)
|
||||
solver := &solver.DeSECDNSProviderSolver{}
|
||||
fixture := acmetest.NewFixture(solver,
|
||||
acmetest.SetResolvedZone("example.com."),
|
||||
desecSolver := &solver.DeSECDNSProviderSolver{}
|
||||
zoneName := os.Getenv("TEST_ZONE_NAME")
|
||||
if zoneName == "" {
|
||||
t.Skip("TEST_ZONE_NAME not set")
|
||||
}
|
||||
fixture := acmetest.NewFixture(desecSolver,
|
||||
acmetest.SetResolvedZone(zoneName),
|
||||
acmetest.SetManifestPath("testdata/desec"),
|
||||
acmetest.SetDNSServer("127.0.0.1:59351"),
|
||||
acmetest.SetUseAuthoritative(false),
|
||||
|
|
|
|||
Loading…
Reference in a new issue