improve validations for user provided file and directory paths

This commit is contained in:
Nicola Murino
2020-03-03 09:09:58 +01:00
parent d0a81cabab
commit 7f1946de34
13 changed files with 72 additions and 10 deletions

View File

@@ -169,6 +169,13 @@ func TestInitialization(t *testing.T) {
if err == nil {
t.Error("Inizialize must fail")
}
httpdConf.CertificateFile = ""
httpdConf.CertificateKeyFile = ""
httpdConf.TemplatesPath = "."
err = httpdConf.Initialize(configDir)
if err == nil {
t.Error("Inizialize must fail")
}
}
func TestBasicUserHandling(t *testing.T) {