fix some lint issues

This commit is contained in:
Nicola Murino
2020-04-30 14:23:55 +02:00
parent 67c6f27064
commit d70959c34c
33 changed files with 236 additions and 225 deletions

View File

@@ -181,6 +181,10 @@ func TestInitialization(t *testing.T) {
if err == nil {
t.Error("Inizialize must fail")
}
err = httpd.ReloadTLSCertificate()
if err != nil {
t.Error("realoding TLS Certificate must return nil error if no certificate is configured")
}
}
func TestBasicUserHandling(t *testing.T) {
@@ -1105,6 +1109,11 @@ func TestDumpdata(t *testing.T) {
if err != nil {
t.Errorf("unexpected error: %v", err)
}
// subdir cannot be created
_, _, err = httpd.Dumpdata(filepath.Join("subdir", "bck.json"), "", http.StatusInternalServerError)
if err != nil {
t.Errorf("unexpected error: %v", err)
}
os.Chmod(backupsPath, 0755)
}
dataProvider = dataprovider.GetProvider()