mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
20 lines
538 B
Go
20 lines
538 B
Go
|
package configuration
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
|
||
|
"github.com/authelia/authelia/internal/utils"
|
||
|
)
|
||
|
|
||
|
func TestShouldHaveSameChecksumForBothTemplates(t *testing.T) {
|
||
|
sumRoot, err := utils.HashSHA256FromPath("../../config.template.yml")
|
||
|
assert.NoError(t, err)
|
||
|
|
||
|
sumInternal, err := utils.HashSHA256FromPath("./config.template.yml")
|
||
|
assert.NoError(t, err)
|
||
|
|
||
|
assert.Equal(t, sumRoot, sumInternal, "Ensure both ./config.template.yml and ./internal/configuration/config.template.yml are exactly the same.")
|
||
|
}
|