config: minor changes to split config and watcher files

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-08-04 13:51:43 +03:00
parent efe215cd60
commit c2f34df493
3 changed files with 82 additions and 77 deletions

View File

@@ -45,10 +45,8 @@ func TestWatch(t *testing.T) {
go func() {
for {
mp, err := w.Next()
if err != nil && err != config.ErrWatcherStopped {
if err != nil {
t.Fatal(err)
} else if err == config.ErrWatcherStopped {
return
}
if len(mp) != 1 {
t.Fatal(fmt.Errorf("default watcher err: %v", mp))