Skip to content

Commit 0bc0c09

Browse files
committed
Update test timeout settings in Makefile and trigger-tests.sh
- Adjusted the timeout for unit tests in the Makefile to use a variable for flexibility. - Updated the trigger-tests.sh script to set a default timeout for ginkgo tests, improving configurability and consistency across test executions.
1 parent f853baf commit 0bc0c09

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ vet: setup/ginkgo ## Run go vet against code.
139139

140140
test: manifests generate fmt vet setup-envtest ## Run tests.
141141
REPORT_FILE="unit_test-$$(date +%Y%m%d-%H%M%S)$${GITHUB_RUN_ID:+-$$GITHUB_RUN_ID}.xml"; \
142-
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use ${ENVTEST_K8S_VERSION} --bin-dir $(LOCALBIN) -p path)" ginkgo --junit-report=$$REPORT_FILE --output-dir=`pwd` -vv --trace --keep-going --timeout=3h --cover --covermode=count --coverprofile=coverage.out ./pkg/splunk/common ./pkg/splunk/enterprise ./pkg/splunk/client ./pkg/splunk/util ./internal/controller ./pkg/splunk/splkcontroller
142+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use ${ENVTEST_K8S_VERSION} --bin-dir $(LOCALBIN) -p path)" ginkgo --junit-report=$$REPORT_FILE --output-dir=`pwd` -vv --trace --keep-going --timeout=$${UNIT_TEST_GINKGO_TIMEOUT:-170m} --cover --covermode=count --coverprofile=coverage.out ./pkg/splunk/common ./pkg/splunk/enterprise ./pkg/splunk/client ./pkg/splunk/util ./internal/controller ./pkg/splunk/splkcontroller
143143

144144

145145
##@ Documentation

test/trigger-tests.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ echo "Skipping following test :: ${TEST_TO_SKIP}"
150150
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
151151
REPORT_FILENAME="report-junit-${TIMESTAMP}${GITHUB_RUN_ID:+-${GITHUB_RUN_ID}}-${TEST_TO_RUN:-all}.xml"
152152

153+
GINKGO_TIMEOUT="${GINKGO_TIMEOUT:-225m}"
154+
153155
# Running only smoke test cases by default or value passed through TEST_FOCUS env variable. To run different test packages add/remove path from focus argument or TEST_FOCUS variable
154-
echo "ginkgo --junit-report=${REPORT_FILENAME} -v --keep-going --trace -r --timeout=7h -nodes=${CLUSTER_NODES} --focus="${TEST_TO_RUN}" --skip="${TEST_TO_SKIP}" --output-interceptor-mode=none --cover ${topdir}/test/ -- -commit-hash=${COMMIT_HASH} -operator-image=${PRIVATE_SPLUNK_OPERATOR_IMAGE} -splunk-image=${PRIVATE_SPLUNK_ENTERPRISE_IMAGE} -cluster-wide=${CLUSTER_WIDE}"
155-
ginkgo --junit-report=${REPORT_FILENAME} --output-dir=`pwd` -v --keep-going --trace -r --timeout=7h -nodes=${CLUSTER_NODES} --focus="${TEST_TO_RUN}" --skip="${TEST_TO_SKIP}" --output-interceptor-mode=none --cover ${topdir}/test/ -- -commit-hash=${COMMIT_HASH} -operator-image=${PRIVATE_SPLUNK_OPERATOR_IMAGE} -splunk-image=${PRIVATE_SPLUNK_ENTERPRISE_IMAGE} -cluster-wide=${CLUSTER_WIDE}
156+
echo "ginkgo --junit-report=${REPORT_FILENAME} -v --keep-going --trace -r --timeout=${GINKGO_TIMEOUT} -nodes=${CLUSTER_NODES} --focus=\"${TEST_TO_RUN}\" --skip=\"${TEST_TO_SKIP}\" --output-interceptor-mode=none --cover ${topdir}/test/ -- -commit-hash=${COMMIT_HASH} -operator-image=${PRIVATE_SPLUNK_OPERATOR_IMAGE} -splunk-image=${PRIVATE_SPLUNK_ENTERPRISE_IMAGE} -cluster-wide=${CLUSTER_WIDE}"
157+
ginkgo --junit-report=${REPORT_FILENAME} --output-dir=`pwd` -v --keep-going --trace -r --timeout=${GINKGO_TIMEOUT} -nodes=${CLUSTER_NODES} --focus="${TEST_TO_RUN}" --skip="${TEST_TO_SKIP}" --output-interceptor-mode=none --cover ${topdir}/test/ -- -commit-hash=${COMMIT_HASH} -operator-image=${PRIVATE_SPLUNK_OPERATOR_IMAGE} -splunk-image=${PRIVATE_SPLUNK_ENTERPRISE_IMAGE} -cluster-wide=${CLUSTER_WIDE}

0 commit comments

Comments
 (0)