Restrict traefik.toml to static configuration.

This commit is contained in:
Ludovic Fernandez 2019-07-15 10:22:03 +02:00 committed by Traefiker Bot
parent f49800e56a
commit 093658836e
78 changed files with 274 additions and 440 deletions

View file

@ -15,6 +15,7 @@ import (
"text/template"
"github.com/containous/traefik/pkg/log"
"github.com/fatih/structs"
"github.com/go-check/check"
compose "github.com/libkermit/compose/check"
checker "github.com/vdemeester/shakers"
@ -150,7 +151,10 @@ func (s *BaseSuite) adaptFile(c *check.C, path string, tempObjects interface{})
c.Assert(err, checker.IsNil)
defer tmpFile.Close()
err = tmpl.ExecuteTemplate(tmpFile, prefix, tempObjects)
model := structs.Map(tempObjects)
model["SelfFilename"] = tmpFile.Name()
err = tmpl.ExecuteTemplate(tmpFile, prefix, model)
c.Assert(err, checker.IsNil)
err = tmpFile.Sync()