Unbreak application.yml, and replace the test that never ran

FixSecurityService
Shipped
3 Agosti 2026, 18:07 UTC
Author
Kamo
Commit
9ec55d1

Three things, all from trying to answer "why not just fix the context test?". 1. **************** declared `kamo:` TWICE and therefore did not parse at all — SnakeYAML throws DuplicateKeyException on it. This has never surfaced because production loads its config from the k8s ConfigMap via SPRING_CONFIG_LOCATION and never reads the bundled file. Any test that boots the context hits it immediately. Merged into one mapping. 2. Deleted **************** It sat in package com.retval.SecurityService — outside the application's package tree — so it could not find a @SpringBootConfiguration, errored on every run, and asserted nothing. It was the context test everyone assumed was protecting them while this service CrashLooped in production twice for want of exactly that check. A test that has never once run is worse than no test: it occupies the slot. 3. Added ApplicationContextStartsTest to replace it, currently @Disabled with a specific reason rather than a shrug. Most of what a real context test needs is now solved in application-contexttest.yml: production's config lives in the ConfigMap, so the bundled file lacks ~15 @Value placeholders and every feature flag that decides whether a bean exists. The profile is therefore DERIVED from k8s/configmap.yaml with all credential-shaped strings replaced by a deterministic dummy (verified: zero unscrubbed), the datasource pointed at a dead port with initialization-fail-timeout -1 so no connection opens and no schema is needed, and cluster DNS names deadened. The one remaining blocker is infrastructure, not config: SecurityServiceApplication carries @EnableRedisHttpSession, which connects to Redis during context refresh. No property avoids it — **************** only skips the CONFIG command. Enabling this needs a Testcontainers Redis or an embedded-redis test dependency, and nothing else. Until then RepositoryScanCoverageTest covers the same failure mode statically and is mutation-proven against the 2026-08-03 outage. Weaker, because it reads source rather than building beans — but it runs.

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei