Skip to content

Commit bb9fbf0

Browse files
authored
ext_proc: Fix status code in the test (envoyproxy#35056)
500 is returned because the onMessageTimeout is invoked by mistake, which is because test is missing skip_header_processing_on_response (or ext_proc test server should handle request) 404 should be returned from upstream sever in this case, as downstream client request failed to reach the server due to route mismatch. --------- Signed-off-by: tyxia <[email protected]>
1 parent 8f246ac commit bb9fbf0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,9 @@ TEST_P(ExtProcIntegrationTest, SetHostHeaderRoutingSucceeded) {
10241024

10251025
TEST_P(ExtProcIntegrationTest, SetHostHeaderRoutingFailed) {
10261026
proto_config_.mutable_mutation_rules()->mutable_allow_all_routing()->set_value(true);
1027+
// Skip the header processing on response path.
1028+
proto_config_.mutable_processing_mode()->set_response_header_mode(ProcessingMode::SKIP);
1029+
10271030
initializeConfig();
10281031
// Set up the route config.
10291032
std::string vhost_domain = "new_host";
@@ -1060,9 +1063,9 @@ TEST_P(ExtProcIntegrationTest, SetHostHeaderRoutingFailed) {
10601063
return true;
10611064
});
10621065

1063-
// The routing to upstream is expected to fail and 500 is returned to downstream client, since no
1066+
// The routing to upstream is expected to fail and 404 is returned to downstream client, since no
10641067
// route is found for mismatched vhost.
1065-
verifyDownstreamResponse(*response, 500);
1068+
verifyDownstreamResponse(*response, 404);
10661069
}
10671070

10681071
TEST_P(ExtProcIntegrationTest, GetAndSetPathHeader) {

0 commit comments

Comments
 (0)