mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-04 17:06:49 +00:00
Add more unit tests
This commit is contained in:
37
backend/internal/dnsproviders/dns_ali_test.go
Normal file
37
backend/internal/dnsproviders/dns_ali_test.go
Normal file
@ -0,0 +1,37 @@
|
||||
package dnsproviders
|
||||
|
||||
import (
|
||||
"npm/internal/util"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestAliProvider(t *testing.T) {
|
||||
provider := getDNSAli()
|
||||
json, err := provider.GetJsonSchema()
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, `{
|
||||
"title": "dns_ali",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"Ali_Key",
|
||||
"Ali_Secret"
|
||||
],
|
||||
"properties": {
|
||||
"Ali_Key": {
|
||||
"title": "api-key",
|
||||
"type": "string",
|
||||
"additionalProperties": false,
|
||||
"minLength": 1
|
||||
},
|
||||
"Ali_Secret": {
|
||||
"title": "secret",
|
||||
"type": "string",
|
||||
"additionalProperties": false,
|
||||
"minLength": 1
|
||||
}
|
||||
}
|
||||
}`, util.PrettyPrintJSON(json))
|
||||
}
|
Reference in New Issue
Block a user