Skip to content

feat(integration): add real Spring Boot 3.x/4.x integration tests#3

Closed
stokpop wants to merge 3 commits into
mainfrom
feature/1357-real-spring-boot-integration-fixtures
Closed

feat(integration): add real Spring Boot 3.x/4.x integration tests#3
stokpop wants to merge 3 commits into
mainfrom
feature/1357-real-spring-boot-integration-fixtures

Conversation

@stokpop

@stokpop stokpop commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

Adds integration tests using real Spring Boot fat jars from java-test-applications to verify end-to-end framework injection.

Relates to cloudfoundry/java-buildpack#1357.

Tests added

Test Spring Boot Java Verifies
SB3 cfenv 3.5 17 java-cfenv 3.x injected, cloud profile active (via RuntimeLogs)
SB4 cfenv 4.1 21 java-cfenv 4.x injected, cloud profile (/active-profiles), jar loaded (/loaded-jars)
SB4 combined 4.1 21 java-cfenv + container-security-provider + cf-metrics-exporter

Design decisions

  • Pre-explode fat jars in fixtures_helper_test.go to simulate CF staging behaviour (CF bits service extracts pushed artifacts as zip before running the buildpack). See switchblade#134.
  • Jars from stokpop fork (v1.0.0-SNAPSHOT) — upstream cloudfoundry/java-test-applications PRs pending merge. Switch URL once v1.0.0 is released.
  • SB3 limited assertions — boot3 app doesn't include RuntimeUtils endpoints yet, so cloud profile checked via runtime logs.

Other changes

  • Fix dead 404 URL in frameworks_test.go
  • Update isSpringBootJar comment in spring_boot.go (no functional change)
  • Update README with correct -run filter patterns for 5-level spec subtests

Verified

All 3 tests pass individually on Docker platform (~108s each).

kiril-keranov and others added 3 commits July 16, 2026 06:53
…oudfoundry#1357)

Add integration tests using real fat jars from java-test-applications
to verify end-to-end java-cfenv injection, cloud profile activation,
and framework wiring (container-security-provider, cf-metrics-exporter).

Three tests:
- SB3 (Boot 3.5, Java 17): java-cfenv 3.x injection, cloud profile
  verified via RuntimeLogs (boot3 app lacks RuntimeUtils endpoints)
- SB4 (Boot 4.1, Java 21): java-cfenv 4.x injection, cloud profile
  via /active-profiles, java-cfenv presence via /loaded-jars
- SB4 combined: java-cfenv + container-security-provider env var +
  cf-metrics-exporter javaagent — all in one deployment

Key design decisions:
- Pre-explode fat jars in fixtures_helper_test.go to simulate CF
  staging (CF bits service extracts pushed jars as zip before running
  the buildpack). See switchblade#134 for CF-vs-Docker divergence.
- Jars sourced from stokpop/java-test-applications@v1.0.0-SNAPSHOT
  pending upstream merge of cloudfoundry/java-test-applications PRs.

Also:
- Fix dead 404 URL in frameworks_test.go
- Update isSpringBootJar comment in spring_boot.go
- Update README with correct 5-level -run filter patterns
@stokpop

stokpop commented Jul 16, 2026

Copy link
Copy Markdown
Owner Author

Superseded by cloudfoundry#1361

@stokpop stokpop closed this Jul 16, 2026
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.

2 participants