Skip to content

Fix integration tests with embedded sqlite and refactoring - #2

Merged
darshanasbg merged 1 commit into
thunder-id:mainfrom
ThaminduDilshan:thamindu-integration
May 4, 2025
Merged

Fix integration tests with embedded sqlite and refactoring#2
darshanasbg merged 1 commit into
thunder-id:mainfrom
ThaminduDilshan:thamindu-integration

Conversation

@ThaminduDilshan

@ThaminduDilshan ThaminduDilshan commented May 4, 2025

Copy link
Copy Markdown
Member

Purpose

This pull request introduces significant enhancements to the Thunder project, including the addition of SQLite database support, improved integration test automation, and refactoring of the build and test workflows. Below is a summary of the most important changes grouped by theme.

Database Enhancements

  • Added SQLite database support by introducing a new driver configuration (sqlite) and a Path field in the DatabaseConfig struct.
  • Created a new SQLite schema file (dbscripts/sqlite.sql).
  • Updated the database initialization script to handle SQLite databases.

Build and Test Workflow Improvements

  • Refactored the Makefile to separate build and packaging steps, introduced a dedicated .build directory for intermediate artifacts, and added a test target for running integration tests.
  • Updated the README to reflect the new make test command for running tests.

Integration Test Enhancements

  • Refactored integration test utilities to support SQLite, including replacing the deployment YAML, running the init script, and starting the server with SQLite configurations.
  • Updated integration tests to validate additional fields (token_type, expires_in) in OAuth2 token responses.
  • Changed the test server port to 8095 and updated related configurations.

Runtime Configuration

  • Introduced a ThunderRuntime struct and related methods to manage runtime configurations, such as ThunderHome.

Refactoring

  • Refactor the services to utilize thunder runtime and remove config parameter.
  • Refactor the db module to utilize a database provider and client.

@ThaminduDilshan
ThaminduDilshan marked this pull request as draft May 4, 2025 05:55
@ThaminduDilshan
ThaminduDilshan marked this pull request as ready for review May 4, 2025 06:59
@ThaminduDilshan
ThaminduDilshan force-pushed the thamindu-integration branch from 8d3356d to f88f2e3 Compare May 4, 2025 09:46
Add support for embedded sqlite and fix integration tests

Clean make file and structure

Update README

Address review comments

Update sqlite schema

Address review comments

Refactor services and db client
@ThaminduDilshan
ThaminduDilshan force-pushed the thamindu-integration branch from f88f2e3 to c195186 Compare May 4, 2025 09:49
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.

2 participants