summaryrefslogtreecommitdiff
path: root/service/reload/config_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-02-27 16:39:35 +0300
committerValery Piashchynski <[email protected]>2020-02-27 16:39:35 +0300
commit9960aff462c985f89e1e9387e0b87bab24504d0e (patch)
treea255061c29da6a0a0e7822476373fc9fe203543b /service/reload/config_test.go
parent40acc6a22c8e1a7418d4668c312e1b9f90aae6fe (diff)
Update reload tests
Diffstat (limited to 'service/reload/config_test.go')
-rw-r--r--service/reload/config_test.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/service/reload/config_test.go b/service/reload/config_test.go
index c9c05a1e..b7e6e669 100644
--- a/service/reload/config_test.go
+++ b/service/reload/config_test.go
@@ -36,8 +36,17 @@ func Test_Fake_ServiceConfig(t *testing.T) {
func Test_Interval(t *testing.T) {
services := make(map[string]ServiceConfig)
+ services["test"] = ServiceConfig{
+ Enabled: false,
+ Recursive: false,
+ Patterns: nil,
+ Dirs: nil,
+ Ignore: nil,
+ service: nil,
+ }
+
cfg := &Config{
- Interval: time.Millisecond,
+ Interval: time.Millisecond, // should crash here
Patterns: nil,
Services: services,
}
@@ -45,11 +54,10 @@ func Test_Interval(t *testing.T) {
}
func Test_NoServiceConfig(t *testing.T) {
- services := make(map[string]ServiceConfig)
cfg := &Config{
- Interval: time.Millisecond,
+ Interval: time.Second,
Patterns: nil,
- Services: services,
+ Services: nil,
}
assert.Error(t, cfg.Valid())
}