diff options
Diffstat (limited to 'plugins/config/tests')
-rwxr-xr-x | plugins/config/tests/.rr.yaml | 10 | ||||
-rwxr-xr-x | plugins/config/tests/config_test.go | 4 | ||||
-rwxr-xr-x | plugins/config/tests/plugin1.go | 4 |
3 files changed, 4 insertions, 14 deletions
diff --git a/plugins/config/tests/.rr.yaml b/plugins/config/tests/.rr.yaml index df9077d0..732a1366 100755 --- a/plugins/config/tests/.rr.yaml +++ b/plugins/config/tests/.rr.yaml @@ -1,21 +1,12 @@ reload: - # enable or disable file watcher enabled: true - # sync interval interval: 1s - # global patterns to sync patterns: [".php"] - # list of included for sync services services: http: - # recursive search for file patterns to add recursive: true - # ignored folders ignore: ["vendor"] - # service specific file pattens to sync patterns: [".php", ".go",".md",] - # directories to sync. If recursive is set to true, - # recursive sync will be applied only to the directories in `dirs` section dirs: ["."] jobs: recursive: false @@ -24,5 +15,4 @@ reload: rpc: recursive: true patterns: [".json"] - # to include all project directories from workdir, leave `dirs` empty or add a dot "." dirs: [""] diff --git a/plugins/config/tests/config_test.go b/plugins/config/tests/config_test.go index 14e60ac2..422e7eee 100755 --- a/plugins/config/tests/config_test.go +++ b/plugins/config/tests/config_test.go @@ -12,11 +12,11 @@ import ( ) func TestViperProvider_Init(t *testing.T) { - container, err := endure.NewContainer(endure.DebugLevel, endure.RetryOnFail(true)) + container, err := endure.NewContainer(nil, endure.RetryOnFail(true), endure.SetLogLevel(endure.DebugLevel)) if err != nil { t.Fatal(err) } - vp := &config.ViperProvider{} + vp := &config.Viper{} vp.Path = ".rr.yaml" vp.Prefix = "rr" err = container.Register(vp) diff --git a/plugins/config/tests/plugin1.go b/plugins/config/tests/plugin1.go index 7c5f2afd..a276c15f 100755 --- a/plugins/config/tests/plugin1.go +++ b/plugins/config/tests/plugin1.go @@ -23,11 +23,11 @@ type ServiceConfig struct { } type Foo struct { - configProvider config.Provider + configProvider config.Configurer } // Depends on S2 and DB (S3 in the current case) -func (f *Foo) Init(p config.Provider) error { +func (f *Foo) Init(p config.Configurer) error { f.configProvider = p return nil } |