2021-08-03 09:55:21 +00:00
|
|
|
package configuration
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
|
2021-08-11 01:04:35 +00:00
|
|
|
"github.com/authelia/authelia/v4/internal/utils"
|
2021-08-03 09:55:21 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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.")
|
|
|
|
}
|