|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | + |
| 17 | +# |
| 18 | +# This replay file assumes that caching is disabled. |
| 19 | +# |
| 20 | + |
| 21 | +meta: |
| 22 | + version: "1.0" |
| 23 | + |
| 24 | +# Configuration section for autest integration |
| 25 | +autest: |
| 26 | + description: 'Verify connect down policy 4 - origin closes connection without sending a response' |
| 27 | + |
| 28 | + dns: |
| 29 | + name: 'dns-policy-4' |
| 30 | + records: |
| 31 | + backend1.example.com: ["127.0.0.1"] |
| 32 | + backend2.example.com: ["127.0.0.1"] |
| 33 | + |
| 34 | + server: |
| 35 | + name: 'server-policy-4' |
| 36 | + |
| 37 | + client: |
| 38 | + name: 'client-policy-4' |
| 39 | + |
| 40 | + ats: |
| 41 | + name: 'ts-policy-4' |
| 42 | + process_config: |
| 43 | + enable_cache: false |
| 44 | + |
| 45 | + records_config: |
| 46 | + proxy.config.diags.debug.enabled: 1 |
| 47 | + proxy.config.diags.debug.tags: 'http|hostdb' |
| 48 | + proxy.config.http.connect.down.policy: 4 |
| 49 | + proxy.config.http.connect_attempts_rr_retries: 0 |
| 50 | + proxy.config.http.connect_attempts_max_retries: 0 |
| 51 | + proxy.config.http.connect_attempts_max_retries_down_server: 0 |
| 52 | + proxy.config.http.connect_attempts_timeout: 1 |
| 53 | + proxy.config.http.down_server.cache_time: 5 |
| 54 | + |
| 55 | + remap_config: |
| 56 | + - from: "http://one.example.com/" |
| 57 | + to: "http://backend1.example.com:{SERVER_HTTP_PORT}/" |
| 58 | + - from: "http://two.example.com/" |
| 59 | + to: "http://backend2.example.com:{SERVER_HTTP_PORT}/" |
| 60 | + |
| 61 | + log_validation: |
| 62 | + error_log: |
| 63 | + gold_file: "gold/connect_down_policy_4_error_log.gold" |
| 64 | + |
| 65 | +sessions: |
| 66 | +- transactions: |
| 67 | + # on_connect: refuse - Server accepts TCP connection but immediately closes it without sending any HTTP response |
| 68 | + - client-request: |
| 69 | + method: GET |
| 70 | + url: /path/ |
| 71 | + version: '1.1' |
| 72 | + headers: |
| 73 | + fields: |
| 74 | + - [Host, one.example.com] |
| 75 | + - [uuid, 1] |
| 76 | + |
| 77 | + server-response: |
| 78 | + on_connect: refuse |
| 79 | + |
| 80 | + proxy-response: |
| 81 | + status: 502 |
| 82 | + |
| 83 | + # Verify the origin is marked down after the close. |
| 84 | + - client-request: |
| 85 | + method: GET |
| 86 | + url: /path/ |
| 87 | + version: '1.1' |
| 88 | + headers: |
| 89 | + fields: |
| 90 | + - [Host, one.example.com] |
| 91 | + - [uuid, 10] |
| 92 | + |
| 93 | + proxy-request: |
| 94 | + expect: absent |
| 95 | + |
| 96 | + server-response: |
| 97 | + status: 200 |
| 98 | + |
| 99 | + proxy-response: |
| 100 | + status: 500 |
| 101 | + |
| 102 | + # on_connect: reset - Server accepts TCP connection but immediately reset it without sending any HTTP response |
| 103 | + - client-request: |
| 104 | + method: GET |
| 105 | + url: /path/ |
| 106 | + version: '1.1' |
| 107 | + headers: |
| 108 | + fields: |
| 109 | + - [Host, two.example.com] |
| 110 | + - [uuid, 2] |
| 111 | + |
| 112 | + server-response: |
| 113 | + on_connect: reset |
| 114 | + |
| 115 | + proxy-response: |
| 116 | + status: 502 |
| 117 | + |
| 118 | + # Verify the origin is marked down after the reset. |
| 119 | + - client-request: |
| 120 | + method: GET |
| 121 | + url: /path/ |
| 122 | + version: '1.1' |
| 123 | + headers: |
| 124 | + fields: |
| 125 | + - [Host, two.example.com] |
| 126 | + - [uuid, 20] |
| 127 | + |
| 128 | + proxy-request: |
| 129 | + expect: absent |
| 130 | + |
| 131 | + server-response: |
| 132 | + status: 200 |
| 133 | + |
| 134 | + proxy-response: |
| 135 | + status: 500 |
0 commit comments