-
Notifications
You must be signed in to change notification settings - Fork 31
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(archives): metadata labels may be set during upload #1063
fix(archives): metadata labels may be set during upload #1063
Conversation
There is a failing unit test that needs correcting or updating. Also, I think you will need to run How do I test this manually? I tried with ex. $ curl -k -v -X POST --header "Authorization: Basic $(echo user:pass | base64)" -F recording=@$HOME/Downloads/es-andrewazor-demo-Main_foo_20220913T134900Z.jfr https://localhost:8181/api/v1/recordings -F metadata='{"labels":{"foo":"bar"}}' and the request seems to hang. If I |
To test it use:
Or multiple labels:
I tested it from web-client editing the Api.services.tsx with:
|
Ah okay nice, that |
Also using httpie, |
Regarding the field name to input the labels, I think that using
|
|
Great work, thanks. The implementation looks good and works nicely in manual testing now. The updated test case looks good, too. Could you add a few more tests? Right now the unit test is only exercising the one case where the |
d1b2998
to
7b74580
Compare
shouldHandleRecordingUploadRequest --> upload containing no labels |
Fixes #1045
The labels are set to the archived recording when "metadata" in JSON (e.g.:
{"reason":"test","reason1":"test1"}
) containing the labels is sent along to the uploaded file.