refactor: Cleanup/simplify testcases in /pkg/extensions (#1116)

Signed-off-by: Nicol Draghici <idraghic@cisco.com>

fix: Increase coverage when copying files

Signed-off-by: Nicol Draghici <idraghic@cisco.com>
This commit is contained in:
Nicol
2023-01-19 18:54:05 +02:00
committed by GitHub
parent b997176363
commit 70a60b4660
12 changed files with 224 additions and 719 deletions
+3 -11
View File
@@ -4,7 +4,6 @@
package sync_test
import (
"context"
"os"
"testing"
@@ -42,17 +41,10 @@ func TestSyncExtension(t *testing.T) {
conf.Log.Output = logFile.Name()
ctlr := api.NewController(conf)
ctlrManager := test.NewControllerManager(ctlr)
go func() {
if err := ctlr.Run(context.Background()); err != nil {
return
}
}()
defer func() {
_ = ctlr.Server.Shutdown(context.Background())
}()
test.WaitTillServerReady(baseURL)
ctlrManager.StartAndWait(port)
defer ctlrManager.StopServer()
Convey("verify sync is skipped when binary doesn't include it", func() {
resp, err := resty.R().