Fallback-aware failure handling for data-bridge - integration test#35
Conversation
malaskowski
left a comment
There was a problem hiding this comment.
Could you please add defaultFallback commented out with short comment (as docs) to the knotx-stack-manager/src/main/packaging/conf/application.conf ? Also please add commented out section with proper comment.
defaultFallback = MY_GLOBAL_ID
fallbacks = [
{
id = MY_GLOBAL_ID
markup = "<knotx:fallback data-knotx-fallback-id='MY_GLOBAL_ID'><p class='error'>error</p></knotx:fallback>"
}
]|
|
||
| @Test | ||
| @KnotxApplyConfiguration("knotx-test-app.conf") | ||
| public void whenRequestingFailingServiceWithFallback_expectFallback( |
There was a problem hiding this comment.
Could you please add one more test that checks if globally set fallback (in config) works?
There was a problem hiding this comment.
configuration example and global fallback test added
| } | ||
|
|
||
| @Test | ||
| @KnotxApplyConfiguration("knotx-test-app-global-fallback.conf") |
There was a problem hiding this comment.
You may add
defaultFallback = MY_GLOBAL_ID
fallbacks = [
{
id = MY_GLOBAL_ID
markup = "<p class='error'>global fallback</p>"
}
]directly to the knotx-test-app.conf.
If you want to add some extra config, please don't copy the whole file (if we do the change in the future we will have to change in multiple places). You may override just a part of a config, @KnotxApplyConfiguration supports this.
Look at the whenRequestingLocalSimplePageWithGetCustomAndDefaultSymbol_expectLocalSimpleHtmlWithDefault. It defines two config files:
@KnotxApplyConfiguration({"knotx-test-app.conf", "knotx-test-handlebars-custom-symbol.conf"})
Where knotx-test-handlebars-custom-symbol.conf overrides some configs from the knotx-test-app.conf.
There was a problem hiding this comment.
changed the test to use a dedicated, minimal config file
Description
Integration test for data bridge and fragment processing failure handling
Motivation and Context
New proposed feature was implemented in knotx core - Knotx/knotx#466. I would like to add an integration test to make sure that it is working
Screenshots (if appropriate)
N/A
Upgrade notes (if appropriate)
Requires Knotx/knotx#466
Types of changes
Checklist:
I hereby agree to the terms of the Knot.x Contributor License Agreement.