1 #define HTTPREQUEST_COMMON_CASE "[" \ 2 "1591111124," \ 3 "{" \ 4 "\"logging.googleapis.com/http_request\": " \ 5 "{" \ 6 "\"requestMethod\": \"test_requestMethod\"," \ 7 "\"requestUrl\": \"test_requestUrl\"," \ 8 "\"userAgent\": \"test_userAgent\"," \ 9 "\"remoteIp\": \"test_remoteIp\"," \ 10 "\"serverIp\": \"test_serverIp\"," \ 11 "\"referer\": \"test_referer\"," \ 12 "\"latency\": \"0s\"," \ 13 "\"protocol\": \"test_protocol\"," \ 14 "\"requestSize\": 123," \ 15 "\"responseSize\": 123," \ 16 "\"status\": 200," \ 17 "\"cacheFillBytes\": 123," \ 18 "\"cacheLookup\": true," \ 19 "\"cacheHit\": true," \ 20 "\"cacheValidatedWithOriginServer\": true" \ 21 "}" \ 22 "}]" 23 24 #define EMPTY_HTTPREQUEST "[" \ plugin_lang_get_defaulted($p_name, $p_default = null, $p_basename = null)25 "1591111124," \ 26 "{" \ 27 "\"logging.googleapis.com/http_request\": " \ 28 "{" \ 29 "}" \ 30 "}]" 31 32 #define HTTPREQUEST_IN_STRING "[" \ 33 "1591111124," \ 34 "{" \ 35 "\"logging.googleapis.com/http_request\": \"some string\"" \ 36 "}]" 37 38 #define PARTIAL_HTTPREQUEST "[" \ 39 "1591111124," \ 40 "{" \ 41 "\"logging.googleapis.com/http_request\": " \ 42 "{" \ 43 "\"cacheLookup\": true," \ 44 "\"cacheHit\": true," \ 45 "\"cacheValidatedWithOriginServer\": true" \ 46 "}" \ 47 "}]" 48 49 #define HTTPREQUEST_SUBFIELDS_IN_INCORRECT_TYPE "[" \ 50 "1591111124," \ 51 "{" \ 52 "\"logging.googleapis.com/http_request\": " \ 53 "{" \ 54 "\"requestMethod\": 123," \ 55 "\"requestUrl\": 123," \ 56 "\"userAgent\": 123," \ 57 "\"remoteIp\": 123," \ 58 "\"serverIp\": true," \ 59 "\"referer\": true," \ 60 "\"latency\": false," \ 61 "\"protocol\": false," \ 62 "\"requestSize\": \"some string\"," \ 63 "\"responseSize\": true," \ 64 "\"status\": false," \ 65 "\"cacheFillBytes\": false," \ 66 "\"cacheLookup\": \"some string\"," \ 67 "\"cacheHit\": 123," \ 68 "\"cacheValidatedWithOriginServer\": 123" \ 69 "}" \ 70 "}]" 71 72 #define HTTPREQUEST_EXTRA_SUBFIELDS_EXISTED "[" \ 73 "1591111124," \ 74 "{" \ 75 "\"logging.googleapis.com/http_request\": " \ 76 "{" \ 77 "\"requestMethod\": \"test_requestMethod\"," \ 78 "\"requestUrl\": \"test_requestUrl\"," \ 79 "\"userAgent\": \"test_userAgent\"," \ 80 "\"remoteIp\": \"test_remoteIp\"," \ 81 "\"serverIp\": \"test_serverIp\"," \ 82 "\"referer\": \"test_referer\"," \ 83 "\"latency\": \"0s\"," \ 84 "\"protocol\": \"test_protocol\"," \ 85 "\"requestSize\": 123," \ 86 "\"responseSize\": 123," \ 87 "\"status\": 200," \ 88 "\"cacheFillBytes\": 123," \ 89 "\"cacheLookup\": true," \ 90 "\"cacheHit\": true," \ 91 "\"cacheValidatedWithOriginServer\": true," \ 92 "\"extra_key1\": \"extra_val1\"," \ 93 "\"extra_key2\": 123," \ 94 "\"extra_key3\": true" \ 95 "}" \ 96 "}]" 97 98 99 /* Tests for 'latency' */ 100 #define HTTPREQUEST_LATENCY_COMMON_CASE "[" \ 101 "1591111124," \ 102 "{" \ 103 "\"logging.googleapis.com/http_request\": " \ 104 "{" \ 105 "\"latency\": \" 100.00 s \"" \ 106 "}" \ 107 "}]" 108 109 #define HTTPREQUEST_LATENCY_INVALID_SPACES "[" \ 110 "1591111124," \ 111 "{" \ 112 "\"logging.googleapis.com/http_request\": " \ 113 "{" \ 114 "\"latency\": \" 100. 00 s \"" \ 115 "}" \ 116 "}]" 117 118 #define HTTPREQUEST_LATENCY_INVALID_STRING "[" \ 119 "1591111124," \ 120 "{" \ 121 "\"logging.googleapis.com/http_request\": " \ 122 "{" \ 123 "\"latency\": \" s100.00 s \"" \ 124 "}" \ 125 "}]" 126 127 #define HTTPREQUEST_LATENCY_INVALID_END "[" \ 128 "1591111124," \ 129 "{" \ 130 "\"logging.googleapis.com/http_request\": " \ 131 "{" \ 132 "\"latency\": \" 100.00 \"" \ 133 "}" \ 134 "}]" 135