mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +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
@@ -290,7 +290,6 @@ func TestServerCVEResponse(t *testing.T) {
|
||||
url := test.GetBaseURL(port)
|
||||
conf := config.New()
|
||||
conf.HTTP.Port = port
|
||||
ctlr := api.NewController(conf)
|
||||
|
||||
dir, err := ioutil.TempDir("", "oci-repo-test")
|
||||
if err != nil {
|
||||
@@ -304,18 +303,21 @@ func TestServerCVEResponse(t *testing.T) {
|
||||
|
||||
defer os.RemoveAll(dir)
|
||||
|
||||
ctlr.Config.Storage.RootDirectory = dir
|
||||
conf.Storage.RootDirectory = dir
|
||||
cveConfig := &extconf.CVEConfig{
|
||||
UpdateInterval: 2,
|
||||
}
|
||||
defaultVal := true
|
||||
searchConfig := &extconf.SearchConfig{
|
||||
CVE: cveConfig,
|
||||
Enable: true,
|
||||
Enable: &defaultVal,
|
||||
}
|
||||
ctlr.Config.Extensions = &extconf.ExtensionConfig{
|
||||
conf.Extensions = &extconf.ExtensionConfig{
|
||||
Search: searchConfig,
|
||||
}
|
||||
|
||||
ctlr := api.NewController(conf)
|
||||
|
||||
go func(controller *api.Controller) {
|
||||
// this blocks
|
||||
if err := controller.Run(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user