Fix review comments

Fixed coredns plugin tests
Check that user filter is not empty
This commit is contained in:
Andrey Meshkov
2018-10-30 11:01:09 +03:00
parent 32d4e80c93
commit 760e3596b6
4 changed files with 22 additions and 12 deletions

View File

@@ -244,10 +244,9 @@ func generateCoreDNSConfigText() (string, error) {
// first of all, append the user filter
userFilter := getUserFilter()
// TODO: Don't add if empty
//if len(userFilter.contents) > 0 {
filters = append(filters, coreDnsFilter{ID: userFilter.ID, Path: userFilter.getFilterFilePath()})
//}
if len(userFilter.contents) > 0 {
filters = append(filters, coreDnsFilter{ID: userFilter.ID, Path: userFilter.getFilterFilePath()})
}
// then go through other filters
for i := range config.Filters {