Skip to content

PostgreSQL support for integration tests  #58

Description

@rashmithachamikara

Description:
PostgreSQL is supported by the application, but the integration test suite is not currently wired to run against PostgreSQL.

The repo contains PostgreSQL runtime support, but the integration test harness only supports mysql and sqlite. In particular:

  • tests/integration/testutils/test_utils.go restricts supported DB_TYPE values to mysql and sqlite
  • the test DB bootstrap logic initializes only MySQL and SQLite schemas
  • build.sh only switches between tests/integration/repository/conf/deployment.yaml (MySQL) and tests/integration/repository/conf/deployment-sqlite.yaml (SQLite)

We currently have no integration-test coverage for PostgreSQL-specific behavior, even though PostgreSQL is a supported database.

It would be useful to add PostgreSQL integration test support by:

  • adding a PostgreSQL integration test config
  • extending the test bootstrap/setup flow to initialize PostgreSQL with db_schema_postgres.sql
  • updating build.sh and test docs to support a PostgreSQL test target

Suggested Labels:
Type/Improvement, Area/Testing, DB/PostgreSQL

Affected Product Version:
Current main branch

OS, DB, other environment details and versions:

  • OS: Any
  • DB: PostgreSQL 14+ expected to be supported by the product
  • Test framework: tests/integration Go integration suite
  • Build entrypoint: ./build.sh test_integration

Steps to reproduce:

  1. Inspect tests/integration/testutils/test_utils.go
  2. Note that supported DB_TYPE values are limited to mysql and sqlite
  3. Inspect build.sh
  4. Note that integration config selection only supports MySQL and SQLite
  5. Inspect the repo for PostgreSQL test config/bootstrap support
  6. Observe that PostgreSQL schema exists, but there is no PostgreSQL integration test path

Related Issues:
#33 #7

Metadata

Metadata

Labels

Type/ImprovementMarks enhancements or improvements to existing features

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions