mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-05 01:09:37 +00:00
Add more unit tests
This commit is contained in:
47
backend/internal/dnsproviders/dns_acmedns_test.go
Normal file
47
backend/internal/dnsproviders/dns_acmedns_test.go
Normal file
@ -0,0 +1,47 @@
|
||||
package dnsproviders
|
||||
|
||||
import (
|
||||
"npm/internal/util"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestAcmeDNSProvider(t *testing.T) {
|
||||
provider := getDNSAcmeDNS()
|
||||
json, err := provider.GetJsonSchema()
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, `{
|
||||
"title": "dns_acmedns",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"ACMEDNS_BASE_URL",
|
||||
"ACMEDNS_SUBDOMAIN",
|
||||
"ACMEDNS_USERNAME",
|
||||
"ACMEDNS_PASSWORD"
|
||||
],
|
||||
"properties": {
|
||||
"ACMEDNS_BASE_URL": {
|
||||
"title": "base-url",
|
||||
"type": "string",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ACMEDNS_PASSWORD": {
|
||||
"title": "password",
|
||||
"type": "string",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ACMEDNS_SUBDOMAIN": {
|
||||
"title": "subdomain",
|
||||
"type": "string",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ACMEDNS_USERNAME": {
|
||||
"title": "username",
|
||||
"type": "string",
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}`, util.PrettyPrintJSON(json))
|
||||
}
|
Reference in New Issue
Block a user