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: fix jobs test fail #773

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

yasuaki640
Copy link

@yasuaki640 yasuaki640 commented Sep 15, 2024

Changes

Fixed pest failure.

The investigation of the change is described in the comment of the diff.

References

https://github.com/php-http/multipart-stream-builder/blob/1.x/CHANGELOG.md#140---2024-09-01

Testing

Contributor Checklist

$keyOffset = 3;
$keyOffset = 2;
Copy link
Author

@yasuaki640 yasuaki640 Sep 15, 2024

Choose a reason for hiding this comment

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

This fix is due to a change in php-http/multipart-stream-builder.

In v1.3.1, body has a Content-Length header (as shown below).

--66e64e8fe1f375.28637093
Content-Disposition: form-data; name="users”
Content-Length: 167

[{“email”: “[email protected]”, “email_verified”:true, “app_metadata”:{“roles”:[“admin”, “super”], “plan”: “premium “}, “user_metadata”:{“theme”: “dark”}}]
--66e64e8fe1f375.28637093
Content-Disposition: form-data; name="connection_id”
Content-Length: 16

__test_conn_id__
--66e64e8fe1f375.28637093
Content-Disposition: form-data; name="upsert”
Content-Length: 4

Content-Disposition: form-data; name=“upsert” Content-Length: 4
...

However, after v.1.3.1, the Content-Length header has been removed, so $keyOffset is misaligned and the test fails.

Therefore, I think it is better to fix the test with this fix to follow the changes in multipart-stream-builder.

Copy link
Author

Choose a reason for hiding this comment

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

(And I think it is better to manage lock files by git as well.)

@yasuaki640 yasuaki640 requested a review from a team as a code owner September 23, 2024 10:13
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.

1 participant