Skip to content

chore(tests): convert remote datastore remote tests to testcontainers…#543

Merged
ajaskolski merged 2 commits into
mainfrom
op-catalog-tests-with-client
Oct 28, 2025
Merged

chore(tests): convert remote datastore remote tests to testcontainers…#543
ajaskolski merged 2 commits into
mainfrom
op-catalog-tests-with-client

Conversation

@ajaskolski

@ajaskolski ajaskolski commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

We have totally skipped remote datastore tests in CI.
This PR rewrites Datastore Remote tests to use testcontainers that can use running service or create the service out of docker image locally and in CI. Updating workflows to actually get the service docker image and run tests on it.

https://smartcontract-it.atlassian.net/browse/CLD-760

CI run https://github.com/smartcontractkit/chainlink-deployments-framework/actions/runs/18840463376/job/53751297255?pr=543 ~1 minute

@changeset-bot

changeset-bot Bot commented Oct 27, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5297341

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ajaskolski ajaskolski force-pushed the op-catalog-tests-with-client branch 2 times, most recently from 895dba6 to a0ab63c Compare October 27, 2025 11:35
… approach using real service; add ci tests with real catalog service
@ajaskolski ajaskolski force-pushed the op-catalog-tests-with-client branch from a0ab63c to bf9a262 Compare October 27, 2025 12:10
@ajaskolski ajaskolski marked this pull request as ready for review October 27, 2025 12:15
@ajaskolski ajaskolski requested a review from a team as a code owner October 27, 2025 12:15
Copilot AI review requested due to automatic review settings October 27, 2025 12:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR converts the remote datastore tests from being skipped in CI to using testcontainers for automated testing. The changes enable both local and CI execution by containerizing PostgreSQL and the catalog service, including automated database migrations.

Key Changes:

  • Implemented testcontainer-based test infrastructure for catalog remote tests
  • Added CI workflow jobs to run catalog remote tests with ECR image
  • Updated documentation with comprehensive testing instructions

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
go.mod Added testcontainers postgres module dependency
datastore/catalog/remote/testcontainer_setup.go New test infrastructure for managing PostgreSQL and catalog service containers
datastore/catalog/remote/main_test.go Test entry point with container lifecycle management
datastore/catalog/remote/README.md Updated documentation with testcontainer usage and configuration
.github/workflows/schedule-main.yml Split test jobs and added catalog remote test job with ECR integration
.github/workflows/pull-request-main.yml Split test jobs and added catalog remote test job with ECR integration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread datastore/catalog/remote/testcontainer_setup.go Outdated
Comment thread datastore/catalog/remote/README.md Outdated
Comment thread .github/workflows/schedule-main.yml Outdated
Comment thread .github/workflows/pull-request-main.yml Outdated
@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
76.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

Comment thread .github/workflows/schedule-main.yml
Comment thread datastore/catalog/remote/testcontainer_setup.go
@ajaskolski ajaskolski added this pull request to the merge queue Oct 28, 2025
Merged via the queue into main with commit f700dc9 Oct 28, 2025
14 of 15 checks passed
@ajaskolski ajaskolski deleted the op-catalog-tests-with-client branch October 28, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants