mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
lint: Move out config reloader context from controller struct
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
353b0c6034
commit
be910cf01c
@@ -115,7 +115,7 @@ func TestRunAlreadyRunningServer(t *testing.T) {
|
||||
ctlr.Config.Storage.RootDirectory = globalDir
|
||||
|
||||
go func() {
|
||||
if err := ctlr.Run(); err != nil {
|
||||
if err := ctlr.Run(context.Background()); err != nil {
|
||||
return
|
||||
}
|
||||
}()
|
||||
@@ -135,7 +135,7 @@ func TestRunAlreadyRunningServer(t *testing.T) {
|
||||
_ = ctlr.Server.Shutdown(ctx)
|
||||
}()
|
||||
|
||||
err := ctlr.Run()
|
||||
err := ctlr.Run(context.Background())
|
||||
So(err, ShouldNotBeNil)
|
||||
})
|
||||
}
|
||||
@@ -156,7 +156,7 @@ func TestObjectStorageController(t *testing.T) {
|
||||
|
||||
ctlr.Config.Storage.RootDirectory = "zot"
|
||||
|
||||
err := ctlr.Run()
|
||||
err := ctlr.Run(context.Background())
|
||||
So(err, ShouldNotBeNil)
|
||||
})
|
||||
|
||||
@@ -770,7 +770,7 @@ func TestMultipleInstance(t *testing.T) {
|
||||
},
|
||||
}
|
||||
ctlr := api.NewController(conf)
|
||||
err := ctlr.Run()
|
||||
err := ctlr.Run(context.Background())
|
||||
So(err, ShouldEqual, errors.ErrImgStoreNotFound)
|
||||
|
||||
globalDir := t.TempDir()
|
||||
@@ -3006,7 +3006,7 @@ func TestImageSignatures(t *testing.T) {
|
||||
ctlr.Config.Storage.RootDirectory = dir
|
||||
go func(controller *api.Controller) {
|
||||
// this blocks
|
||||
if err := controller.Run(); err != nil {
|
||||
if err := controller.Run(context.Background()); err != nil {
|
||||
return
|
||||
}
|
||||
}(ctlr)
|
||||
@@ -4198,7 +4198,8 @@ func getAllManifests(imagePath string) []string {
|
||||
|
||||
func startServer(c *api.Controller) {
|
||||
// this blocks
|
||||
if err := c.Run(); err != nil {
|
||||
ctx := context.Background()
|
||||
if err := c.Run(ctx); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user