Add unit tests for RabbitMq and Udp transport servers and clients
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
- Implemented comprehensive unit tests for RabbitMqTransportServer, covering constructor, disposal, connection management, event handlers, and exception handling. - Added configuration tests for RabbitMqTransportServer to validate SSL, durable queues, auto-recovery, and custom virtual host options. - Created unit tests for UdpFrameProtocol, including frame parsing and serialization, header size validation, and round-trip data preservation. - Developed tests for UdpTransportClient, focusing on connection handling, event subscriptions, and exception scenarios. - Established tests for UdpTransportServer, ensuring proper start/stop behavior, connection state management, and event handling. - Included tests for UdpTransportOptions to verify default values and modification capabilities. - Enhanced service registration tests for Udp transport services in the dependency injection container.
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
# StellaOps Router
|
||||
|
||||
The StellaOps Router is the internal communication infrastructure that enables microservices to communicate through a central gateway.
|
||||
|
||||
## Overview
|
||||
|
||||
The router provides:
|
||||
|
||||
- **Gateway WebService** (`StellaOps.Gateway.WebService`): HTTP ingress service that routes requests to microservices
|
||||
- **Microservice SDK** (`StellaOps.Microservice`): SDK for building microservices that connect to the router
|
||||
- **Transport Plugins**: Multiple transport options (TCP, TLS, UDP, RabbitMQ, InMemory for testing)
|
||||
- **Claims-based Authorization**: Using `RequiringClaims` instead of role-based access
|
||||
|
||||
## Key Documents
|
||||
|
||||
| Document | Purpose |
|
||||
|----------|---------|
|
||||
| [specs.md](./specs.md) | **Canonical specification** - READ FIRST |
|
||||
| [implplan.md](./implplan.md) | High-level implementation plan |
|
||||
| [SPRINT_INDEX.md](./SPRINT_INDEX.md) | Sprint overview and dependency graph |
|
||||
|
||||
## Solution Structure
|
||||
|
||||
```
|
||||
StellaOps.Router.slnx
|
||||
├── src/__Libraries/
|
||||
│ ├── StellaOps.Router.Common/ # Shared types, enums, interfaces
|
||||
│ ├── StellaOps.Router.Config/ # Router configuration models
|
||||
│ ├── StellaOps.Microservice/ # Microservice SDK
|
||||
│ └── StellaOps.Microservice.SourceGen/ # Build-time endpoint discovery
|
||||
├── src/Gateway/
|
||||
│ └── StellaOps.Gateway.WebService/ # HTTP gateway service
|
||||
└── tests/
|
||||
├── StellaOps.Router.Common.Tests/
|
||||
├── StellaOps.Gateway.WebService.Tests/
|
||||
└── StellaOps.Microservice.Tests/
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
# Build the router solution
|
||||
dotnet build StellaOps.Router.slnx
|
||||
|
||||
# Run tests
|
||||
dotnet test StellaOps.Router.slnx
|
||||
```
|
||||
|
||||
## Invariants (Non-Negotiable)
|
||||
|
||||
From the specification, these are non-negotiable:
|
||||
|
||||
- **Method + Path** is the endpoint identity
|
||||
- **Strict semver** for version matching
|
||||
- **Region from GatewayNodeConfig.Region** (never from headers/host)
|
||||
- **No HTTP transport** between gateway and microservices
|
||||
- **RequiringClaims** (not AllowedRoles) for authorization
|
||||
- **Opaque body handling** (router doesn't interpret payloads)
|
||||
|
||||
## Status
|
||||
|
||||
Currently in development. See [SPRINT_INDEX.md](./SPRINT_INDEX.md) for implementation progress.
|
||||
Reference in New Issue
Block a user