Test Kibana managed network validation without Docker - #12072
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe managed-mode network validator now receives both network values explicitly. Tests call the validator directly and cover missing, shared, and differing explicit networks. ChangesManaged network validation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to The refactor preserves managed-network validation behavior while making its tests Docker-independent. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Part of #12070: make Kibana's managed-mode network validation tests independent of Docker.
The two negative tests currently call
kibana.start(), which starts the Elasticsearch dependency before reaching the network validation. Extract the existing validation into a package-private static helper accepting the two network instances, and exercise it directly.configureManagedElasticsearch()still invokes the same checks in the same order.Simply avoiding
start()is insufficient: constructingKibanaContainer(es)resolves the Elasticsearch image name and can initialize Docker. These tests now need only uninitializedNetworkobjects, with no container construction, image resolution, or startup.Coverage includes both valid configurations (neither network explicit, or the same explicit network) and all three invalid configurations (only Elasticsearch explicit, only Kibana explicit, or different networks). Existing happy-path integration tests are unchanged. This does not attempt the other CI/matrix optimizations proposed in #12070.
Validation
checkstyleMain,checkstyleTest,spotlessApply, andspotlessCheckpass.Summary by CodeRabbit
Bug Fixes
Tests