TRT-2865: Add CI job to run the integration tests - #3854
TRT-2865: Add CI job to run the integration tests#3854openshift-trt-agent[bot] wants to merge 1 commit into
Conversation
Add external Postgres support so integration tests can run in CI environments where a container runtime is unavailable. When the SIPPY_INTEGRATION_DSN env var is set, tests connect to the provided Postgres instance instead of spinning up a testcontainer. - Add ConnectToExternalPostgres to test/integration/util for CI use - Add scripts/integration.sh for Postgres setup in devcontainer/host - Add ci-integration Makefile target - Fix template DB cleanup to handle re-runs on the same Postgres Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@openshift-trt-agent[bot]: This pull request references TRT-2865 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the spike to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-trt-agent[bot] The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @openshift-trt-agent[bot]. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/close Closing this PR — the approach did not match the intent of TRT-2865. The work will be done as a ci-operator config change in openshift/release instead. |
|
@redhat-chai-bot: You can't close an active issue/PR unless you authored it or you are a collaborator. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
Adds CI support for running integration tests as a PR requirement (TRT-2865).
The integration tests currently rely on testcontainers-go to spin up a Postgres container, which requires a container runtime (Docker/Podman) unavailable in OpenShift CI test pods. This PR adds an external Postgres mode: when
SIPPY_INTEGRATION_DSNis set, tests connect to the provided Postgres instance directly, bypassing testcontainers.Changes:
test/integration/util/testdb.go: AddedConnectToExternalPostgres()for CI environments where Postgres is provided as a service. Fixed template DB cleanup to handle re-runs on the same Postgres instance (unmark template before dropping).test/integration/jobs_test.go:TestMainchecksSIPPY_INTEGRATION_DSNenv var to choose between external Postgres and testcontainers.scripts/integration.sh: CI runner script (modeled afterscripts/e2e.sh) that handles Postgres setup in devcontainer/host environments and runsmake integration.Makefile: Addedci-integrationtarget that runs the integration script.CI Configuration (openshift/release)
To complete this work, add a ci-operator test step in the openshift/release repo that:
quay.io/enterprisedb/postgresql)SIPPY_INTEGRATION_DSNpointing to the sidecarmake integrationTest plan
go vet ./test/integration/...passesgolangci-lint run ./test/integration/...passes (0 issues)SIPPY_INTEGRATION_DSNset)scripts/integration.shin devcontainergotestsum ./pkg/...)Jira: https://issues.redhat.com/browse/TRT-2865
Generated with Claude Code