mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 04:22:12 +00:00
[tests] Properly test for multiple headers with same name in probes (#9538)
Updates the `responseHeaders` probe checks to properly test for multiple headers with the same name. Previously the probes were using `headers.get()` which concats multiple headers into a single string, which results in the test not really checking if there are in fact multiple headers with the same name. Using `headers.raw()` allows us to properly test for that. A couple of Python tests that were already checking for multiple `set-cookie` headers needed to be updated to match the full value, since the check now properly validates the full string match of each header (before it was basically just doing a `string.includes()` check). This is a precursor for https://github.com/vercel/vercel/pull/9533.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
{
|
||||
"path": "/cookie_wsgi.py",
|
||||
"responseHeaders": {
|
||||
"set-cookie": ["one=first", "two=second"]
|
||||
"set-cookie": ["one=first; Path=/", "two=second; Path=/"]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user