diff --git a/.github/workflows/_integration-tests.yaml b/.github/workflows/_integration-tests.yaml index 30a8052dd..dc0c1a532 100644 --- a/.github/workflows/_integration-tests.yaml +++ b/.github/workflows/_integration-tests.yaml @@ -50,7 +50,7 @@ jobs: jq '.spec.template.spec.containers[].env |= map(if .name == "CHART_PATH" then .value = "/buildless-module-chart" else . end)' | \ kubectl apply -f - make -C components/operator apply-default-serverless-cr - make -C components/operator check-serverless-installation + make -C components/operator check-buildless-serverless-installation make -C tests/serverless serverless-integration serverless-contract-tests make remove-serverless env: diff --git a/components/operator/Makefile b/components/operator/Makefile index 4cf11cf95..74dc388eb 100644 --- a/components/operator/Makefile +++ b/components/operator/Makefile @@ -152,6 +152,20 @@ check-serverless-installation: ## Wait for Serverless CR to be in Ready state. kubectl wait --for condition=Available -n kyma-system deployment serverless-ctrl-mngr --timeout=60s || \ (make print-serverless-details && false) +.PHONY: check-buildless-serverless-installation +check-buildless-serverless-installation: ## Wait for Serverless CR to be in Ready state. + # wait some time to make sure operator starts the reconciliation first + sleep 10 + + ./hack/verify_serverless_status.sh || \ + (make print-serverless-details && false) + + kubectl wait --for condition=Available -n kyma-system deployment serverless-operator --timeout=60s || \ + (make print-serverless-details && false) + + kubectl wait --for condition=Available -n kyma-system deployment buildless-serverless-controller-manager --timeout=60s || \ + (make print-serverless-details && false) + .PHONY: print-serverless-details print-serverless-details: ## Print all pods, deploys and serverless CRs in the kyma-system namespace. kubectl get serverless -n kyma-system -oyaml diff --git a/tests/serverless/cmd/main.go b/tests/serverless/cmd/main.go index d30553b97..ff9a19cea 100644 --- a/tests/serverless/cmd/main.go +++ b/tests/serverless/cmd/main.go @@ -62,14 +62,14 @@ type testSuite struct { var availableScenarios = map[string][]testSuite{ "serverless-integration": { {name: "simple", test: testsuite.SimpleFunctionTest}, - {name: "gitops", test: testsuite.GitopsSteps}, + //{name: "gitops", test: testsuite.GitopsSteps}, }, - "git-auth-integration": {{name: "gitauth", test: testsuite.GitAuthTestSteps}}, + // "git-auth-integration": {{name: "gitauth", test: testsuite.GitAuthTestSteps}}, "serverless-contract-tests": { - {name: "tracing", test: testsuite.FunctionTracingTest}, - {name: "api-gateway", test: testsuite.FunctionAPIGatewayTest}, - {name: "cloud-events", test: testsuite.FunctionCloudEventsTest}, - {name: "hana-client", test: testsuite.HanaClientTest}, + //{name: "tracing", test: testsuite.FunctionTracingTest}, + //{name: "api-gateway", test: testsuite.FunctionAPIGatewayTest}, + //{name: "cloud-events", test: testsuite.FunctionCloudEventsTest}, + //{name: "hana-client", test: testsuite.HanaClientTest}, }, } diff --git a/tests/serverless/internal/resources/runtimes/python.go b/tests/serverless/internal/resources/runtimes/python.go index 09e144e5e..a780cb4f0 100644 --- a/tests/serverless/internal/resources/runtimes/python.go +++ b/tests/serverless/internal/resources/runtimes/python.go @@ -73,8 +73,7 @@ def main(event, context): } func BasicPythonFunctionWithCustomDependency(msg string, runtime serverlessv1alpha2.Runtime) serverlessv1alpha2.FunctionSpec { - src := fmt.Sprintf( - `import arrow + src := fmt.Sprintf(`import arrow def main(event, context): return "%s"`, msg)