Web Tier pipeline execution failing during TestCacheInvalidation

Description

The Web Tier pipeline execution is failing and you observe the message below in the logs:


=== RUN TestCacheInvalidation

main_test.go:237: Test fails. Expected header ‘X-Vhost’ to be existing and not: ‘catch-all’, got: ‘catch-all’

— FAIL: TestCacheInvalidation (0.00s)

FAIL

exit status 1

Resolution

Verify if your dispatcher configuration has properly configured some vhost for dispatcher cache invalidation (call being done to host 127.0.0.1) and if you have an X-Vhost header set that is neither empty
e.g., as in https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/dispatcher.cloud/src/conf.d/available_vhosts/default.vhost#L24
and that the request does not reach catch-all vhost with X-Vhost header set to “catch-all” as in https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf#L136

On this page