Envtest based integration tests for Fission (#2858)

* skeleton for envtest fission
* Refactor code and add CLI test
* hack
* Update server test
* remove skip-ci for lint tests
* Pass client go storagesvc
* Add clientGen interface across code
* Fix storagesvc test
* Fix cmd client
* add retry in server test
* Fix concurrenct access to pool deployment
* Remove old executor test
* get rid of ginkgo/gomega
* disable flaky test
* flaky test
* revert ci change
* handle err from ParseBool

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
This commit is contained in:
Sanket Sudake
2023-10-26 12:09:11 +05:30
committed by GitHub
co-authored by Pranoy Kundu
parent 15e16fcc82
commit 8a17d391c5
44 changed files with 534 additions and 524 deletions
+3 -2
View File
@@ -28,6 +28,7 @@ import (
"go.opentelemetry.io/otel"
"go.uber.org/zap"
"github.com/fission/fission/pkg/crd"
"github.com/fission/fission/pkg/fetcher"
"github.com/fission/fission/pkg/utils/httpserver"
otelUtils "github.com/fission/fission/pkg/utils/otel"
@@ -37,7 +38,7 @@ var (
readyToServe uint32
)
func Run(ctx context.Context, logger *zap.Logger) {
func Run(ctx context.Context, clientGen crd.ClientGeneratorInterface, logger *zap.Logger) {
flag.Usage = fetcherUsage
specializeOnStart := flag.Bool("specialize-on-startup", false, "Flag to activate specialize process at pod startup")
specializePayload := flag.String("specialize-request", "", "JSON payload for specialize request")
@@ -72,7 +73,7 @@ func Run(ctx context.Context, logger *zap.Logger) {
ctx, span := tracer.Start(ctx, "fetcher/Run")
defer span.End()
f, err := fetcher.MakeFetcher(logger, dir, *secretDir, *configDir)
f, err := fetcher.MakeFetcher(logger, clientGen, dir, *secretDir, *configDir)
if err != nil {
logger.Fatal("error making fetcher", zap.Error(err))
}
+2 -1
View File
@@ -20,6 +20,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
"github.com/fission/fission/cmd/fetcher/app"
"github.com/fission/fission/pkg/crd"
"github.com/fission/fission/pkg/utils/loggerfactory"
"github.com/fission/fission/pkg/utils/profile"
)
@@ -31,5 +32,5 @@ func main() {
ctx := signals.SetupSignalHandler()
profile.ProfileIfEnabled(ctx, logger)
app.Run(ctx, logger)
app.Run(ctx, crd.NewClientGenerator(), logger)
}