Small code enhancements

This commit is contained in:
Michael 2018-08-06 20:00:03 +02:00 committed by Traefiker Bot
parent 015cd7a3d0
commit 9cd47dd2aa
41 changed files with 187 additions and 85 deletions

View file

@ -708,7 +708,10 @@ func modifyCertificateConfFileContent(c *check.C, certFileName, confFileName, en
defer func() {
f.Close()
}()
f.Truncate(0)
err = f.Truncate(0)
c.Assert(err, checker.IsNil)
// If certificate file is not provided, just truncate the configuration file
if len(certFileName) > 0 {
tlsConf := types.Configuration{