summaryrefslogtreecommitdiff
path: root/tests/plugins/reload/config_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/reload/config_test.go')
-rw-r--r--tests/plugins/reload/config_test.go63
1 files changed, 0 insertions, 63 deletions
diff --git a/tests/plugins/reload/config_test.go b/tests/plugins/reload/config_test.go
deleted file mode 100644
index 72c11070..00000000
--- a/tests/plugins/reload/config_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package reload
-
-import (
- "testing"
- "time"
-
- "github.com/spiral/roadrunner/v2/plugins/reload"
- "github.com/stretchr/testify/assert"
-)
-
-func Test_Config_Valid(t *testing.T) {
- services := make(map[string]reload.ServiceConfig)
- services["test"] = reload.ServiceConfig{
- Recursive: false,
- Patterns: nil,
- Dirs: nil,
- Ignore: nil,
- }
-
- cfg := &reload.Config{
- Interval: time.Second,
- Patterns: nil,
- Services: services,
- }
- assert.NoError(t, cfg.Valid())
-}
-
-func Test_Fake_ServiceConfig(t *testing.T) {
- services := make(map[string]reload.ServiceConfig)
- cfg := &reload.Config{
- Interval: time.Microsecond,
- Patterns: nil,
- Services: services,
- }
- assert.Error(t, cfg.Valid())
-}
-
-func Test_Interval(t *testing.T) {
- services := make(map[string]reload.ServiceConfig)
- services["test"] = reload.ServiceConfig{
- Enabled: false,
- Recursive: false,
- Patterns: nil,
- Dirs: nil,
- Ignore: nil,
- }
-
- cfg := &reload.Config{
- Interval: time.Millisecond, // should crash here
- Patterns: nil,
- Services: services,
- }
- assert.Error(t, cfg.Valid())
-}
-
-func Test_NoServiceConfig(t *testing.T) {
- cfg := &reload.Config{
- Interval: time.Second,
- Patterns: nil,
- Services: nil,
- }
- assert.Error(t, cfg.Valid())
-}