Skip to content

Conversation

@rbjornstad
Copy link
Contributor

This pull request adds comprehensive integration tests for handling PostgreSQL instances in the Kubernetes resource layer, specifically for the someteamname team in the dev environment. It introduces new test data for applications and PostgreSQL resources and validates various GraphQL queries related to listing, retrieving, and associating PostgreSQL instances with applications and environments.

Integration test coverage for PostgreSQL instances:

  • Added a new integration test suite in postgres_instances.lua that covers:
    • Listing PostgreSQL instances for a team, including sorting and ordering.
    • Retrieving specific PostgreSQL instances by environment and name.
    • Querying PostgreSQL instances associated with specific applications, including cases where no database is attached.
    • Validating the fields and structure of PostgreSQL instance objects in GraphQL responses.

Test data and Kubernetes resource definitions:

  • Added test Kubernetes resources for two PostgreSQL instances (foobar and another-db) with different configurations under someteamname in the dev environment. [1] [2]
  • Added test applications, one with a PostgreSQL dependency and one without, to validate application-to-database relationships.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an integration test suite and supporting Kubernetes fixtures to validate GraphQL queries for PostgreSQL instances and their association to applications/environments in the Kubernetes resource layer (team someteamname, env dev).

Changes:

  • Added integration_tests/postgres_instances.lua covering list/get queries for Postgres instances and application associations.
  • Added Postgres CR fixtures for two instances (foobar, another-db) under dev/someteamname.
  • Added Application CR fixtures for one app with a Postgres dependency and one without.

Reviewed changes

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

File Description
integration_tests/postgres_instances.lua New GraphQL integration test coverage for Postgres instance listing, retrieval, and app associations.
integration_tests/k8s_resources/postgres_instances/dev/someteamname/postgres_foobar.yaml Fixture Postgres resource for foobar (v17) used by the tests.
integration_tests/k8s_resources/postgres_instances/dev/someteamname/postgres_another_db.yaml Fixture Postgres resource for another-db (v16) used by the tests.
integration_tests/k8s_resources/postgres_instances/dev/someteamname/applications.yaml Fixture applications used to validate presence/absence of Postgres attachments.

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rbjornstad rbjornstad merged commit 9c7190e into main Feb 11, 2026
10 checks passed
@rbjornstad rbjornstad deleted the add_postgres_luatests branch February 11, 2026 12:07
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.

1 participant