diff --git a/.gitignore b/.gitignore index e915029..2516a3d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ ################################################################################ /.vs +apiserver.local.config diff --git a/main.go b/main.go index 969e6d2..5e293ef 100644 --- a/main.go +++ b/main.go @@ -12,6 +12,10 @@ import ( "github.com/cert-manager/cert-manager/pkg/acme/webhook/cmd" ) +const ( + providerName = "sthome" +) + var GroupName = os.Getenv("GROUP_NAME") func main() { @@ -74,7 +78,7 @@ type customDNSProviderConfig struct { // within a single webhook deployment**. // For example, `cloudflare` may be used as the name of a solver. func (c *customDNSProviderSolver) Name() string { - return "my-custom-solver" + return providerName } // Present is responsible for actually presenting the DNS record with the diff --git a/sthome/sthome_test.go b/sthome/sthome_test.go index d285a53..7e45d6a 100644 --- a/sthome/sthome_test.go +++ b/sthome/sthome_test.go @@ -10,14 +10,14 @@ import ( "github.com/stretchr/testify/assert" ) -func TeststhomeSolver_Name(t *testing.T) { +func TestSthomeSolver_Name(t *testing.T) { port, _ := rand.Int(rand.Reader, big.NewInt(50000)) port = port.Add(port, big.NewInt(15534)) solver := New(port.String()) assert.Equal(t, "sthome", solver.Name()) } -func TeststhomeSolver_Initialize(t *testing.T) { +func TestSthomeSolver_Initialize(t *testing.T) { port, _ := rand.Int(rand.Reader, big.NewInt(50000)) port = port.Add(port, big.NewInt(15534)) solver := New(port.String()) @@ -27,7 +27,7 @@ func TeststhomeSolver_Initialize(t *testing.T) { close(done) } -func TeststhomeSolver_Present_Cleanup(t *testing.T) { +func TestSthomeSolver_Present_Cleanup(t *testing.T) { port, _ := rand.Int(rand.Reader, big.NewInt(50000)) port = port.Add(port, big.NewInt(15534)) solver := New(port.String())