Host validation test cases - #14224
Conversation
|
JanithaSampathBandara seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds test helper wrappers and comprehensive integration test suites, cases, TOML deployment profiles, and test resources to validate host/network-access rules across platform allow mode, private-block mode, disabled mode, and tenant allow mode. ChangesHost Validation Integration Tests
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@all-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/other/HostValidationDisabledTestCase.java`:
- Around line 45-51: The test uses a fixed API name when constructing the
APIRequest which can cause restAPIPublisher.addAPI(...) to return null on name
collisions and lead to a null dereference when assigning apiId; change the
APIRequest creation in HostValidationDisabledTestCase to use a unique name
(e.g., append a timestamp or UUID to "HostValidationDisabledTestAPI") and add a
null check/assert after restAPIPublisher.addAPI(apiRequest) before assigning
apiId to fail fast with a clear message if the API creation returned null.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0dbc664f-cf38-4d79-afbd-4fec1a06dec1
⛔ Files ignored due to path filters (3)
all-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/hostValidationResources/hv-test-api-blocked.zipis excluded by!**/*.zipall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/hostValidationResources/hv-test-mcp-blocked.zipis excluded by!**/*.zipall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/hostValidationResources/hv-test-mcp-valid.zipis excluded by!**/*.zip
📒 Files selected for processing (18)
all-in-one-apim/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIAdminImpl.javaall-in-one-apim/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/impl/RestAPIPublisherImpl.javaall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/other/HostValidationAllowModeTestCase.javaall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/other/HostValidationAllowModeTestSuite.javaall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/other/HostValidationDisabledTestCase.javaall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/other/HostValidationDisabledTestSuite.javaall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/other/HostValidationPrivateBlockTestCase.javaall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/other/HostValidationPrivateBlockTestSuite.javaall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/other/HostValidationTenantAllowModeTestCase.javaall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/other/HostValidationTenantAllowModeTestSuite.javaall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/hostValidationAllowModeBpnaEnabled/deployment.tomlall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/hostValidationDisabled/deployment.tomlall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/hostValidationPrivateBlock/deployment.tomlall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/hostValidationTenantAllowMode/deployment.tomlall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/hostValidationResources/hv-test-asyncapi.yamlall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/hostValidationResources/hv-test-graphql.graphqlall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/hostValidationResources/hv-test-openapi.yamlall-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml
Purpose
This PR adds product-level integration test coverage for outbound network access control and destination validation functionality.
Goals
Approach
Added integration test coverage for:
Testing
Verified:
Release Note
Added integration test coverage for outbound network access control and destination validation functionality.