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