mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
23 lines
629 B
Go
23 lines
629 B
Go
|
package configuration
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestShouldParseConfigFile(t *testing.T) {
|
||
|
config, errors := Read("../test-resources/config.yml")
|
||
|
|
||
|
assert.Len(t, errors, 0)
|
||
|
|
||
|
assert.Equal(t, 9091, config.Port)
|
||
|
assert.Equal(t, "debug", config.LogsLevel)
|
||
|
assert.Equal(t, "https://home.example.com:8080/", config.DefaultRedirectionURL)
|
||
|
assert.Equal(t, "authelia.com", config.TOTP.Issuer)
|
||
|
|
||
|
assert.Equal(t, "api-123456789.example.com", config.DuoAPI.Hostname)
|
||
|
assert.Equal(t, "ABCDEF", config.DuoAPI.IntegrationKey)
|
||
|
assert.Equal(t, "1234567890abcdefghifjkl", config.DuoAPI.SecretKey)
|
||
|
}
|