Skip to content

Add roda-api-tests E2E module and fix IndexService NPE#3669

Closed
luis100 wants to merge 18 commits into
masterfrom
development
Closed

Add roda-api-tests E2E module and fix IndexService NPE#3669
luis100 wants to merge 18 commits into
masterfrom
development

Conversation

@luis100
Copy link
Copy Markdown
Member

@luis100 luis100 commented May 8, 2026

Summary

  • Adds a new roda-api-tests Maven module (activated via -Pe2e) with black-box E2E API tests that spin up the full RODA stack via Testcontainers (ComposeContainer) and exercise the REST API with REST Assured
  • Adds deploys/standalone/docker-compose-e2e.yaml — the compose file used by the test infrastructure
  • Fixes a NullPointerException in IndexService.count() when CountRequest.getFilter() is null (changed .toString() to String.valueOf())

New tests (AipApiTest)

Test Endpoint
getAuthenticatedUser_returnsAdminUser GET /members/users/authenticated
countAips_withAllFilter_returns200AndNonNegativeCount POST /aips/count
findAips_withAllFilter_returns200AndValidIndexResult POST /aips/find
getAipConfigurationTypes_returns200 GET /aips/configuration/types

Readiness strategy

Testcontainers polls /actuator/health until "status":"UP" (covers RODA, Solr, PostgreSQL), then a secondary loop polls GET /members/users/authenticated until LDAP auth is operational (LDAP initialization lags the actuator signal by ~10 s).

How to run

# Requires Docker with Compose V2 and docker.io/keeps/roda:development locally
mvn test -Pe2e

Test plan

  • All 4 tests pass against a local keeps/roda:development image
  • IndexService NPE fix verified: POST /aips/count no longer returns 500 when filter is null

🤖 Generated with Claude Code

luis100 and others added 18 commits May 4, 2026 10:32
correct DetailsPanelLogEntry location package.
Co-authored-by: Luis Faria <lfaria@keep.pt>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces a new Maven module (roda-api-tests, activated via -Pe2e) that
runs black-box API tests against a live RODA stack managed by Testcontainers
(ComposeContainer). Tests use REST Assured against OpenAPI-generated model
POJOs and cover authentication, AIP count, AIP find, and configuration
endpoints.

Readiness uses a two-phase approach: Testcontainers polls /actuator/health
until "status":"UP", then a custom loop polls /members/users/authenticated
until LDAP auth is operational.

Also fixes a NullPointerException in IndexService.count() when
CountRequest.getFilter() is null (changed toString() to String.valueOf()).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label May 8, 2026
@luis100 luis100 requested a review from hmiguim May 8, 2026 15:38
@luis100 luis100 closed this May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug enhancement size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants