Skip to content

Test integration#4

Merged
jekiapp merged 35 commits into
mainfrom
test-integration
Jul 28, 2025
Merged

Test integration#4
jekiapp merged 35 commits into
mainfrom
test-integration

Conversation

@jekiapp
Copy link
Copy Markdown
Owner

@jekiapp jekiapp commented Jul 28, 2025

Test integration

Overview

This PR introduces comprehensive integration testing infrastructure and scripts for the topic-master project. It includes Docker-based setup for both the main service and test scripts, as well as a suite of integration tests covering core API and user flows.

Key Changes

  • Docker Integration

    • Added Dockerfiles and docker-compose configuration for both topic-master and test-script services.
    • Supports environment variable configuration (e.g., TOPIC_MASTER_ROOT_PASS).
    • Test data directory and port mappings included for seamless local and CI testing.
  • Integration Tests

    • Added detailed integration tests for:
      • Topic listing and handling
      • WebSocket connections and topic events
      • Channel management (listing, pausing, resuming, emptying, claiming, bookmarking, deleting)
      • Group management (creation, updating, deletion)
      • User management (manual creation, signup, password reset, login experience)
      • Application detail and registration flows
    • Enhanced test coverage with checks for both success and error scenarios.
    • Improved test automation with helper functions for user and group management.
  • Test Infrastructure Improvements

    • Extracted and refactored common test helpers for better code reuse.
    • Updated test scripts to use new API endpoints and improved error logging.
    • Added t.Cleanup for proper resource cleanup after tests.
  • CI/CD Enhancements

    • Added GitHub Actions workflow for automated integration testing using Docker Compose.
    • Updated Makefile and CI scripts for streamlined test execution.

Notable Refactors

  • Removed obsolete test files and updated test parameter order for clarity.
  • Simplified utility functions for local environment detection.
  • Improved error messages and test reliability.

How to Test

  1. Build and start the services using Docker Compose:
    docker-compose -f infra/test_script/docker-compose.yml up --build
  2. Run the integration tests via the test-script container.
  3. Review logs for detailed test results and error diagnostics.

This PR lays the foundation for robust, automated integration testing and improves developer experience for future feature development and maintenance.

jekiapp added 30 commits July 21, 2025 06:54
…ervice, add test data directory and integration test for listing topics
…t, add Go module files and adjust dependencies
…t, and update Makefile for test script execution
…ming, emptying, claiming, bookmarking, and deleting channels
…go for improved group handling and parameter order
@jekiapp jekiapp merged commit ddb12ae into main Jul 28, 2025
1 check passed
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