Add wait group for graceful shutdown, closes #302

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
Petu Eusebiu
2021-12-02 19:45:26 +02:00
committed by Ramkumar Chinchani
parent f011192615
commit 627cb97ef1
8 changed files with 68 additions and 105 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"io/ioutil"
"os"
"path"
goSync "sync"
"testing"
"time"
@@ -101,7 +102,7 @@ func TestSyncInternal(t *testing.T) {
cfg := Config{Registries: []RegistryConfig{syncRegistryConfig}, CredentialsFile: "/invalid/path/to/file"}
So(Run(cfg, storage.StoreController{}, log.NewLogger("debug", "")), ShouldNotBeNil)
So(Run(cfg, storage.StoreController{}, new(goSync.WaitGroup), log.NewLogger("debug", "")), ShouldNotBeNil)
_, err = getFileCredentials("/invalid/path/to/file")
So(err, ShouldNotBeNil)