Skip to content

Backend: add missing unit tests for untested components #107

Description

@pcastelo

Problem

Several critical backend components have zero test coverage.

Missing test classes (priority order)

High priority (security + core functionality)

  • ChatResource / ChatService — AI interaction, prompt injection vectors
  • ClusterService — cluster CRUD, token management
  • ThreeScaleResource — REST layer for 3scale operations
  • MigrationResource — REST layer validation (currently only service is tested)
  • AuditService / AuditResource — audit trail integrity

Medium priority (generators + tools)

  • RateLimitResourceGenerator — rate limit policy YAML generation
  • AuthPolicyResourceGenerator — auth policy YAML generation
  • PlanPolicyResourceGenerator — plan policy YAML generation
  • KuadrantCtlService — external CLI invocation
  • ExportManifestValidator — manifest validation logic

Lower priority (MCP + metrics)

  • ConnectivityLinkMcpTools — MCP tool execution
  • MigrationAgent / GateForgeTools — AI agent tools
  • GateForgeMetrics — metrics registration
  • HubResource — Developer Hub integration

Acceptance criteria

  • At least one unit test per class above
  • Test both happy path and error scenarios
  • Use mock/stub for external dependencies (K8s client, AI, 3scale API)
  • All new tests pass in CI

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendQuarkus backendpriority:highShould fix soontestingTest coverage and quality

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions