Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(core): set proper malformed cookie instead of empty in server #1988

Merged

Conversation

bernardobridge
Copy link
Contributor

@bernardobridge bernardobridge commented Jul 13, 2023

Why

This test https://github.com/artilleryio/artillery/blob/main/packages/core/test/core/test_cookies.js#L59-L80 is consistently failing. This started happening due to this dependency upgrade: 9dcda2a?short_path=053150b#diff-053150b640a7ce75eff69d1a22cae7f0f94ad64ce9a855db544dda0929316519 . Which moved tough-cookie from 4.0.0 (>2 years old) to 4.1.3.

How

This logic from tough-cookie salesforce/tough-cookie@1b25269#diff-2d82e6dd06f50c43f369547b8edcc1937fd3a9e403480d2e87541f6c125a70d9R462-R466 means that the Cookie.parse returns null, which causes the library to error. This is a check before looseMode, and seems to be intended behaviour. It seems looseMode is only intended for cookies that are non-empty.

Fixes the test server by sending a malformed cookie that is non-empty.

@hassy hassy merged commit 0693b80 into main Jul 13, 2023
3 checks passed
@hassy hassy deleted the bernardobridge/art-1142-fix-broken-cookie-test-in-artillery-cli branch July 13, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants