Use Clientset interface instead of type for Fission/kubernetes clients (#2416)

Using interface makes it easy to create a fake client and unit test
a specific portion of the code. We should be able to more write unit
test and increase coverage of code with this change.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2022-04-21 16:49:52 +05:30
committed by GitHub
parent 3bdbeb6c87
commit 2a43213387
39 changed files with 123 additions and 129 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ func Start(ctx context.Context, logger *zap.Logger, port int, unitTestFlag bool,
cLogger.Fatal("failed to find fission CRDs", zap.Error(err))
}
err = fc.WaitForCRDs()
err = crd.WaitForCRDs(fc)
if err != nil {
cLogger.Fatal("error waiting for CRDs", zap.Error(err))
}