middleware/file: transfer from does not make sense (#314)

Make it return an error when you use `transfer from` when you're
not a secondary.

Add tests as well.

Fixes #310
This commit is contained in:
Miek Gieben 2016-10-02 19:41:00 +01:00 committed by GitHub
parent 560f11d148
commit cc486fb900
3 changed files with 15 additions and 4 deletions

View file

@ -26,6 +26,13 @@ func TestFileParse(t *testing.T) {
shouldErr bool
expectedZones Zones
}{
{
`file ` + zoneFileName1 + ` miek.nl {
transfer from 127.0.0.1
}`,
true,
Zones{},
},
{
`file`,
true,