mirror of
https://github.com/nspcc-dev/neofs-rest-gw.git
synced 2026-03-01 04:29:14 +00:00
Errors related to testcases #61
Labels
No labels
I2
I3
I3
I4
S2
S3
S3
S4
U0
U1
U2
U3
U3
U3
U4
blocked
bug
config
documentation
enhancement
feature
go
help wanted
question
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-rest-gw#61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tatiana-nspcc on GitHub (Mar 6, 2024).
Originally assigned to: @tatiana-nspcc on GitHub.
When I started to edit Python tests in the
testcasesrepository, I found several mistakes:Current Behavior & Possible Solution
get_by_attribute:fileName- we process the upload correctly (it is added to the container as FileName), but in thegetrequest, it returns asX-Attribute-Filename(due to automatic transformations, and it's unclear if it can be changed), but we expect that theget_by_attributerequest will have the correct case (Filename) and here we can make exceptions again forFileNameandFilePathif needed.file-Name: inget-X-Attribute-File-Name, inget_by_attributeit finds byFile-Name, but not byfile-Name. Here we can fix it so that it is found by attribute, but it will remain as is inget.cat%jpeg: in get -X-Attribute-Cat%jpeg, inget_by_attributeit does not find bycat%25jpegin any case.get:Expected Behavior
We expect the rest-gw to pass all tests for the http-gw.
Your Environment
NeoFS REST Gateway
Version: 0.7.1
GoVersion: go1.20.6
@tatiana-nspcc commented on GitHub (Mar 13, 2024):
Here we made an exception for
FileNameandFilePath, but all other attribute keys are transformed to the Canonical MIME Header Key , which corresponds to the format used on upload. That means that if some object was uploaded through another gate or cli with a sTRangE_attr_key it cannot be found by theget_by_attributein therest-gw.Fixed as described above.
Now it works. But there was also an issue related to URL quote in
testcaseswhere spaces were replaced with "+" symbols. Due to https://datatracker.ietf.org/doc/html/rfc2396 we changed that test (" " -> "%20") in https://github.com/nspcc-dev/neofs-testcases/pull/735It was probably a one-time glitch, not reproduced again.