1
Testing and Releases
max edited this page 2026-09-26 13:06:58 +02:00

Testing and Releases

This document describes the automated test infrastructure, CI/CD pipeline, and cross-compilation release distribution workflow for LOGAR.


1. Automated Test Suite

LOGAR includes comprehensive unit and integration test suites:

Running Unit Tests

python -m unittest discover -s tests -v

The test suite executes 35 unit tests verifying:

  • Dynamic Root CA generation and server TLS certificate issuance.
  • Dynamic client certificate issuance with CN and authority key extensions.
  • Enrollment secret authentication, seat limits, and certificate revocation.
  • Proactive certificate validity checks, Root CA auto-renewal, and in-flight server SSLContext reload.
  • Subordinate CA CSR generation, WebSocket enrollment, and dynamic seat quota updates.
  • Administrator session authentication, PBKDF2 hashing, and Hermes Bearer token lifecycle.
  • Windows & Linux event log collection, deduplication, and mTLS certificate verification.
  • 12-hour evaluation window and direct Hermes anomaly verification.

End-to-End Pipeline Integration Test

# 1. Initialize test configuration
python src/Server.py --create-client-config --server-host 127.0.0.1 --server-port 9443 --client-out client_config.json

# 2. Launch server in background
python src/Server.py &

# 3. Run integration test
python tests/test_pipeline.py

Tests client enrollment, secret rejection, mTLS TLS 1.3 socket handshake, direct warning promotion, immediate error promotion, and Hermes report output.


2. Continuous Integration (ci.yml)

Every push or pull request to main triggers .gitea/workflows/ci.yml:

  • Checks Python code syntax.
  • Runs all 35 unit tests in an isolated environment.
  • Executes end-to-end mTLS pipeline integration tests.

3. Releases & Binary Cross-Compilation (release.yml)

Releases are published automatically upon pushing a git tag:

git tag v3.0.1
git push origin v3.0.1

Linux-Based Cross-Compilation Pipeline

The workflow runs on a single ubuntu-latest runner executing python compilation/package_dist.py --target all:

  1. Linux Binaries: Standalone native ELF executables (Linux_Client.bin, Server.bin).
  2. Windows Executables & Bundles: Cross-compiled standalone binaries (Win_Client.exe, Server.exe) and .zip distribution packages.
  3. SHA256 Checksums: Generated automatically as sha256sums.txt.
  4. Gitea Release Publication: upload_release.py uploads all compiled assets and changelogs directly to the Gitea release page.

Manual Workflow Dispatch

Releases can also be triggered on demand via the Gitea UI:

  1. Navigate to Actions \rightarrow Release Binaries & Installers (release.yml).
  2. Click Run workflow, specify the release tag (e.g. v3.0.1), and execute.

4. Local Packaging & Asset Publishing

To build binaries and upload releases directly from a developer workstation:

# 1. Build all target binaries locally
python compilation/package_dist.py --target all

# 2. Upload assets and release notes to Gitea
python compilation/upload_release.py --tag v3.0.1 --token <GITEA_TOKEN> --skip-build