mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
Added config enable=true/false for extensions with default value as enabled closes #258
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
730fe70f2f
commit
47c9b6244e
@@ -36,8 +36,9 @@ func TestExtensionMetrics(t *testing.T) {
|
||||
|
||||
conf.Storage.RootDirectory = rootDir
|
||||
conf.Extensions = &extconf.ExtensionConfig{}
|
||||
enabled := true
|
||||
conf.Extensions.Metrics = &extconf.MetricsConfig{
|
||||
Enable: true,
|
||||
Enable: &enabled,
|
||||
Prometheus: &extconf.PrometheusConfig{Path: "/metrics"},
|
||||
}
|
||||
|
||||
@@ -95,7 +96,8 @@ func TestExtensionMetrics(t *testing.T) {
|
||||
|
||||
conf.Storage.RootDirectory = rootDir
|
||||
conf.Extensions = &extconf.ExtensionConfig{}
|
||||
conf.Extensions.Metrics = &extconf.MetricsConfig{Enable: false}
|
||||
var disabled bool
|
||||
conf.Extensions.Metrics = &extconf.MetricsConfig{Enable: &disabled}
|
||||
|
||||
ctlr := api.NewController(conf)
|
||||
So(ctlr, ShouldNotBeNil)
|
||||
|
||||
Reference in New Issue
Block a user