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

fix: set cookies only on correlation #172

Merged
merged 3 commits into from
Sep 20, 2024
Merged

Conversation

Llandy3d
Copy link
Member

We were setting cookies regardless if they were correlated or not. That should be handled by k6 so now we only actually set cookies if they have a correlation value

Copy link
Collaborator

@e-fisher e-fisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify, if we pass cookies = {} then k6 executable will handle cookies automatically?

I've also done some testing with correlation rule on test.k6.io, looks like it no longer sets cookies even when correlation rule matches, attaching har and generator:

cookie-correl.zip

@Llandy3d
Copy link
Member Author

nger sets cookies even wh

Nice catch! I pushed a fix and a new test case

Regarding cookies = {} left in there, we eventually want to get rid of it but from tests it seems like it's not causing issues with k6 handling of cookies 🙇

Copy link
Collaborator

@e-fisher e-fisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@Llandy3d Llandy3d merged commit b16c20e into main Sep 20, 2024
1 check passed
@Llandy3d Llandy3d deleted the cookies_set_only_on_correlation branch September 20, 2024 11:49
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