forked from TrueCloudLab/frostfs-http-gw
[#222] Fix zip streaming
Skip objects with invalid FilePath Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
131f2dbcfc
commit
b2db6300c4
2 changed files with 34 additions and 22 deletions
|
@ -28,8 +28,6 @@ import (
|
|||
"github.com/testcontainers/testcontainers-go/wait"
|
||||
)
|
||||
|
||||
const attributeFilePath = "FilePath"
|
||||
|
||||
type putResponse struct {
|
||||
CID string `json:"container_id"`
|
||||
OID string `json:"object_id"`
|
||||
|
@ -249,8 +247,8 @@ func getByAttr(ctx context.Context, t *testing.T, clientPool *pool.Pool, ownerID
|
|||
func getZip(ctx context.Context, t *testing.T, clientPool *pool.Pool, ownerID user.ID, CID cid.ID, version string) {
|
||||
names := []string{"zipfolder/dir/name1.txt", "zipfolder/name2.txt"}
|
||||
contents := []string{"content of file1", "content of file2"}
|
||||
attributes1 := map[string]string{attributeFilePath: names[0]}
|
||||
attributes2 := map[string]string{attributeFilePath: names[1]}
|
||||
attributes1 := map[string]string{object.AttributeFilePath: names[0]}
|
||||
attributes2 := map[string]string{object.AttributeFilePath: names[1]}
|
||||
|
||||
putObject(ctx, t, clientPool, ownerID, CID, contents[0], attributes1)
|
||||
putObject(ctx, t, clientPool, ownerID, CID, contents[1], attributes2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue