summaryrefslogtreecommitdiff
path: root/service/gzip/service_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/gzip/service_test.go')
-rw-r--r--service/gzip/service_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/service/gzip/service_test.go b/service/gzip/service_test.go
index 858dbe56..ba14b862 100644
--- a/service/gzip/service_test.go
+++ b/service/gzip/service_test.go
@@ -47,3 +47,21 @@ func Test_Disabled(t *testing.T) {
assert.NotNil(t, s)
assert.Equal(t, service.StatusInactive, st)
}
+
+// TEST bug #275
+func Test_Bug275(t *testing.T) {
+ logger, _ := test.NewNullLogger()
+ logger.SetLevel(logrus.DebugLevel)
+
+ c := service.NewContainer(logger)
+ c.Register(ID, &Service{})
+
+ assert.Error(t, c.Init(&testCfg{
+ httpCfg:"",
+ gzip: `{"enable":false}`,
+ }))
+
+ s, st := c.Get(ID)
+ assert.NotNil(t, s)
+ assert.Equal(t, service.StatusInactive, st)
+}