forked from TrueCloudLab/frostfs-http-gw
[#111] Fix expiration epoch headers
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
dbbc9e05cf
commit
d6dd244756
2 changed files with 46 additions and 0 deletions
23
downloader/download_test.go
Normal file
23
downloader/download_test.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package downloader
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestSystemBackwardTranslator(t *testing.T) {
|
||||
input := []string{
|
||||
"__NEOFS__EXPIRATION_EPOCH",
|
||||
"__NEOFS__RANDOM_ATTR",
|
||||
}
|
||||
expected := []string{
|
||||
"Neofs-Expiration-Epoch",
|
||||
"Neofs-Random-Attr",
|
||||
}
|
||||
|
||||
for i, str := range input {
|
||||
res := systemBackwardTranslator(str)
|
||||
require.Equal(t, expected[i], res)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue