diff options
author | Wolfy-J <[email protected]> | 2018-09-30 18:47:20 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-09-30 18:47:20 +0300 |
commit | c7b6b81c044305a3d65d1d53eb7f7bc172b37bf2 (patch) | |
tree | 186565b7602da6cbf851375afeda7f6b98ccfacb /service/static/service_test.go | |
parent | 06f0a97e81905c880dc83813dd5b7f6f458ca724 (diff) |
more tests
Diffstat (limited to 'service/static/service_test.go')
-rw-r--r-- | service/static/service_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/service/static/service_test.go b/service/static/service_test.go index 7b40b8ad..fbc26a58 100644 --- a/service/static/service_test.go +++ b/service/static/service_test.go @@ -84,6 +84,22 @@ func Test_Files(t *testing.T) { assert.Equal(t, "sample", b) } +func Test_Disabled(t *testing.T) { + logger, _ := test.NewNullLogger() + logger.SetLevel(logrus.DebugLevel) + + c := service.NewContainer(logger) + c.Register(ID, &Service{}) + + assert.NoError(t, c.Init(&testCfg{ + static: `{"enable":true, "dir":"../../tests", "forbid":[]}`, + })) + + s, st := c.Get(ID) + assert.NotNil(t, s) + assert.Equal(t, service.StatusRegistered, st) +} + func Test_Files_Disable(t *testing.T) { logger, _ := test.NewNullLogger() logger.SetLevel(logrus.DebugLevel) |