diff --git a/go.mod b/go.mod index 76f1be94e0..4e61291e4a 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/viper v1.15.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/tyler-smith/go-bip39 v1.1.0 github.com/ybbus/jsonrpc/v3 v3.1.5 // nolint golang.org/x/crypto v0.24.0 @@ -23,6 +23,7 @@ require ( require ( github.com/andybalholm/brotli v1.0.5 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/hack-pad/go-webworkers v0.1.0 // indirect github.com/hack-pad/safejs v0.1.1 // indirect @@ -35,6 +36,7 @@ require ( github.com/remeh/sizedwaitgroup v1.0.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.51.0 // indirect + github.com/x448/float16 v0.8.4 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.9.0 // indirect go.uber.org/zap v1.24.0 // indirect @@ -47,7 +49,7 @@ require ( ) require ( - github.com/0chain/common v0.0.6-0.20230127095721-8df4d1d72565 + github.com/0chain/common v1.13.1-0.20240924052546-7261e0567e47 github.com/Luzifer/go-openssl/v3 v3.1.0 // indirect github.com/PuerkitoBio/goquery v1.8.1 // indirect github.com/andybalholm/cascadia v1.3.1 // indirect @@ -68,7 +70,7 @@ require ( github.com/gobwas/glob v0.2.3 // indirect github.com/gocolly/colly v1.2.0 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/h2non/filetype v1.1.4-0.20231228185113-6469358c2bcb // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -86,7 +88,6 @@ require ( github.com/philhofer/fwd v1.1.2-0.20210722190033-5c56ac6d0bb9 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/spf13/afero v1.9.3 // indirect @@ -106,7 +107,7 @@ require ( golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect ) diff --git a/go.sum b/go.sum index 2e383915b9..a26be4384a 100644 --- a/go.sum +++ b/go.sum @@ -36,14 +36,14 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/0chain/common v0.0.6-0.20230127095721-8df4d1d72565 h1:z+DtCR8mBsjPnEsT2XtRu4X7GfBiMnz9dYvWYs9V0B4= -github.com/0chain/common v0.0.6-0.20230127095721-8df4d1d72565/go.mod h1:UyDC8Qyl5z9lGkCnf9RHJPMektnFX8XtCJZHXCCVj8E= +github.com/0chain/common v1.13.1-0.20240924052546-7261e0567e47 h1:nAXvrfLrBlN+H65CcF6qroWAYu75Weu/TCLrQ93lbGA= +github.com/0chain/common v1.13.1-0.20240924052546-7261e0567e47/go.mod h1:vHK9Q0/nz28PxmKsLSMLzEs5iK6QVgl1LxdDQdR7y6s= github.com/0chain/errors v1.0.3 h1:QQZPFxTfnMcRdt32DXbzRQIfGWmBsKoEdszKQDb0rRM= github.com/0chain/errors v1.0.3/go.mod h1:xymD6nVgrbgttWwkpSCfLLEJbFO6iHGQwk/yeSuYkIc= -github.com/0chain/gosdk v1.17.5 h1:WusXPOj+lyK9XBUY1JPjBqPmkGV4A0J6bqsRluseusg= -github.com/0chain/gosdk v1.17.5/go.mod h1:y7Ucdmv40VltqulZnncMNjNQ4piX5Dta5ujNmPmXnxg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Luzifer/go-openssl/v3 v3.1.0 h1:QqKqo6kYXGGUsvtUoCpRZm8lHw+jDfhbzr36gVj+/gw= github.com/Luzifer/go-openssl/v3 v3.1.0/go.mod h1:liy3FXuuS8hfDlYh1T+l78AwQ/NjZflJz0NDvjKhwDs= github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM= @@ -66,6 +66,8 @@ github.com/aws/aws-sdk-go v1.44.331 h1:hEwdOTv6973uegCUY2EY8jyyq0OUg9INc0HOzcu2b github.com/aws/aws-sdk-go v1.44.331/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= @@ -103,6 +105,18 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -135,8 +149,12 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -150,6 +168,8 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gocolly/colly v1.2.0 h1:qRz9YAn8FIH0qzgNUw+HT9UN7wm1oF9OBAilwEWpyrI= github.com/gocolly/colly v1.2.0/go.mod h1:Hof5T3ZswNVsOHYmba1u03W65HDWgpV5HifSuueE0EA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -180,8 +200,8 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -302,6 +322,8 @@ github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPn github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -326,14 +348,21 @@ github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/philhofer/fwd v1.1.2-0.20210722190033-5c56ac6d0bb9 h1:6ob53CVz+ja2i7easAStApZJlh7sxyq3Cm7g1Di6iqA= github.com/philhofer/fwd v1.1.2-0.20210722190033-5c56ac6d0bb9/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.12.0 h1:C+UIj/QWtmqY13Arb8kwMt5j34/0Z2iKamrJ+ryC0Gg= +github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a h1:CmF68hwI0XsOQ5UwlBopMi2Ow4Pbg32akc4KIVCOm+Y= +github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/remeh/sizedwaitgroup v1.0.0 h1:VNGGFwNo/R5+MJBf6yrsr110p0m4/OX4S3DCy7Kyl5E= @@ -343,8 +372,8 @@ github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -371,8 +400,9 @@ github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobt github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -381,8 +411,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -403,6 +433,8 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA= github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/ybbus/jsonrpc/v3 v3.1.5 h1:0cC/QzS8OCuXYqqDbYnKKhsEe+IZLrNlDx8KPCieeW0= @@ -463,6 +495,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -774,8 +808,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/api/model/api.go b/internal/api/model/api.go index 6d5dca3f79..7f8f50096d 100644 --- a/internal/api/model/api.go +++ b/internal/api/model/api.go @@ -490,6 +490,7 @@ type SCRestGetAllocationBlobbersResponse struct { Blobbers *[]string `json:"blobbers"` BlobberAuthTickets []string `json:"blobber_auth_tickets"` BlobberRequirements + StorageVersion int `json:"storage_version"` } type SCRestGetAllocationRequest struct { diff --git a/internal/api/model/helper.go b/internal/api/model/helper.go index 0d48a841c9..92a7a9f7ca 100644 --- a/internal/api/model/helper.go +++ b/internal/api/model/helper.go @@ -4,7 +4,7 @@ import "time" func DefaultBlobberRequirements(id, publicKey string) BlobberRequirements { return BlobberRequirements{ - Size: 60000, + Size: 64 * 1024 * 4 * 50, DataShards: 3, ParityShards: 1, ExpirationDate: time.Now().Add(721 * time.Hour).Unix(), diff --git a/internal/api/util/client/api_client.go b/internal/api/util/client/api_client.go index 3b325674f5..28a6fb72a3 100644 --- a/internal/api/util/client/api_client.go +++ b/internal/api/util/client/api_client.go @@ -689,6 +689,7 @@ func (c *APIClient) V1SCRestGetAllocation(t *test.SystemTest, scRestGetAllocatio func (c *APIClient) V1SCRestGetAllocationBlobbers(t *test.SystemTest, scRestGetAllocationBlobbersRequest *model.SCRestGetAllocationBlobbersRequest, requiredStatusCode int) (*model.SCRestGetAllocationBlobbersResponse, *resty.Response, error) { //nolint scRestGetAllocationBlobbersResponse := new(model.SCRestGetAllocationBlobbersResponse) + scRestGetAllocationBlobbersResponse.StorageVersion = 1 data, err := json.Marshal(scRestGetAllocationBlobbersRequest.BlobberRequirements) if err != nil { @@ -1233,6 +1234,8 @@ func (c *APIClient) GetAllocationBlobbers(t *test.SystemTest, wallet *model.Wall BlobberRequirements: *blobberRequirements, }, requiredStatusCode) + scRestGetAllocationBlobbersResponse.StorageVersion = 1 + if requiredStatusCode == http.StatusOK { require.Nil(t, err) require.NotNil(t, resp) diff --git a/internal/api/util/client/sdk.go b/internal/api/util/client/sdk.go index c4955aae92..3a73391ab6 100644 --- a/internal/api/util/client/sdk.go +++ b/internal/api/util/client/sdk.go @@ -316,7 +316,7 @@ func (c *SDKClient) AddRenameOperation(t *test.SystemTest, allocationID, remoteP return sdk.OperationRequest{ OperationType: constants.FileOperationRename, RemotePath: remotePath, - DestName: "/" + filepath.Join("", newName), + DestName: newName, } } diff --git a/tests/api_tests/config/api_tests_config.yaml b/tests/api_tests/config/api_tests_config.yaml index 5e9482735f..0aebea7b18 100644 --- a/tests/api_tests/config/api_tests_config.yaml +++ b/tests/api_tests/config/api_tests_config.yaml @@ -1,11 +1,11 @@ -block_worker: https://dev.zus.network/dns +block_worker: https://dev-3.devnet-0chain.net/dns 0box_url: http://0box.dev.devnet-0chain.net 0box_phone_number: +917696229925 zvault_url: http://zvault.dev.devnet-0chain.net zauth_url: http://zauth.dev.devnet-0chain.net default_test_case_timeout: 45s zs3_server_url: https://dev.0chain.net/zs3server/ -chimney_test_network: https://dev.zus.network/dns +chimney_test_network: https://dev-3.devnet-0chain.net/dns blobber_owner_wallet_mnemonics: "economy day fan flower between rebuild valid bid catch bargain vivid hybrid room permit check manage mean twelve damage summer close churn boat either" owner_wallet_mnemonics: "cactus panther essence ability copper fox wise actual need cousin boat uncover ride diamond group jacket anchor current float rely tragic omit child payment" ethereum_address: 0xD8c9156e782C68EE671C09b6b92de76C97948432 diff --git a/tests/api_tests/config/wallets.json b/tests/api_tests/config/wallets.json index becf50f2e5..84b094861b 100644 --- a/tests/api_tests/config/wallets.json +++ b/tests/api_tests/config/wallets.json @@ -1,4 +1,20 @@ [ + { + "client_id": "306517a2de8b1d994d0951ba45e276cedc1d1dca32c0e9b731066791eaf8dedc", + "client_key": "2875211706e5d0262913418e344baaf05794d6b23ce6dc81f71bdddf9096e21684df0141f2b3f03ff79e2a3dc5cf376b628a5bd6c9f5f93806c408f6c603a083", + "keys": [ + { + "public_key": "2875211706e5d0262913418e344baaf05794d6b23ce6dc81f71bdddf9096e21684df0141f2b3f03ff79e2a3dc5cf376b628a5bd6c9f5f93806c408f6c603a083", + "private_key": "39293962c1064ab6de775e8da8095966f4fed36c4b9d1937ab537c6da2a69414" + } + ], + "mnemonics": "situate myself awkward material blame crucial head trick distance term system labor maximum pond trade disease prevent coach lion planet bounce afford gauge leisure", + "version": "1.0", + "date_created": "2023-11-26T01:23:58Z", + "nonce": 1, + "ChainID": "0afc093ffb509f059c55478bc1a60351cef7b4e9c008a53a6cc8241ca8617dfe", + "SignatureScheme": null + }, { "client_id": "306517a2de8b1d994d0951ba45e276cedc1d1dca32c0e9b731066791eaf8dedc", "client_key": "2875211706e5d0262913418e344baaf05794d6b23ce6dc81f71bdddf9096e21684df0141f2b3f03ff79e2a3dc5cf376b628a5bd6c9f5f93806c408f6c603a083", @@ -39999,4 +40015,4 @@ "ChainID": "0afc093ffb509f059c55478bc1a60351cef7b4e9c008a53a6cc8241ca8617dfe", "SignatureScheme": null } -] \ No newline at end of file +] diff --git a/tests/api_tests/multiop_rollback_test.go b/tests/api_tests/multiop_rollback_test.go index c52847f925..f2c57995de 100644 --- a/tests/api_tests/multiop_rollback_test.go +++ b/tests/api_tests/multiop_rollback_test.go @@ -136,16 +136,13 @@ func TestMultiOperationRollback(testSetup *testing.T) { newOps := make([]sdk.OperationRequest, 0, 10) for i := 0; i < 10; i++ { - switch i % 3 { + switch i % 2 { case 0: op := sdkClient.AddDeleteOperation(t, allocationID, ops[i].FileMeta.RemotePath) newOps = append(newOps, op) case 1: op := sdkClient.AddUpdateOperation(t, ops[i].FileMeta.RemotePath, ops[i].FileMeta.RemoteName, ops[i].FileMeta.ActualSize) newOps = append(newOps, op) - case 2: - op := sdkClient.AddRenameOperation(t, allocationID, ops[i].FileMeta.RemotePath, randName()) - newOps = append(newOps, op) } } diff --git a/tests/api_tests/repair_allocation_test.go b/tests/api_tests/repair_allocation_test.go index d27b8ec916..777b922ef9 100644 --- a/tests/api_tests/repair_allocation_test.go +++ b/tests/api_tests/repair_allocation_test.go @@ -32,7 +32,7 @@ func TestRepairAllocation(testSetup *testing.T) { blobberRequirements := model.DefaultBlobberRequirements(wallet.Id, wallet.PublicKey) blobberRequirements.DataShards = 2 blobberRequirements.ParityShards = 2 - blobberRequirements.Size = 2056 + blobberRequirements.Size = 64 * 1024 * 3 allocationBlobbers := apiClient.GetAllocationBlobbers(t, wallet, &blobberRequirements, client.HttpOkStatus) allocationID := apiClient.CreateAllocation(t, wallet, allocationBlobbers, client.TxSuccessfulStatus) @@ -76,7 +76,7 @@ func TestRepairAllocation(testSetup *testing.T) { t.RunSequentially("Repair allocation after update should work", func(t *test.SystemTest) { blobberRequirements := model.DefaultBlobberRequirements(wallet.Id, wallet.PublicKey) - blobberRequirements.Size = 6096 + blobberRequirements.Size = 64 * 1024 * 10 * 2 blobberRequirements.DataShards = 2 blobberRequirements.ParityShards = 2 allocationBlobbers := apiClient.GetAllocationBlobbers(t, wallet, &blobberRequirements, client.HttpOkStatus) @@ -106,7 +106,7 @@ func TestRepairAllocation(testSetup *testing.T) { t.RunSequentially("Repair allocation after delete should work", func(t *test.SystemTest) { blobberRequirements := model.DefaultBlobberRequirements(wallet.Id, wallet.PublicKey) - blobberRequirements.Size = 2056 + blobberRequirements.Size = 64 * 1024 * 3 blobberRequirements.DataShards = 2 blobberRequirements.ParityShards = 2 allocationBlobbers := apiClient.GetAllocationBlobbers(t, wallet, &blobberRequirements, client.HttpOkStatus) @@ -130,7 +130,7 @@ func TestRepairAllocation(testSetup *testing.T) { t.RunSequentially("Repair allocation after move should work", func(t *test.SystemTest) { blobberRequirements := model.DefaultBlobberRequirements(wallet.Id, wallet.PublicKey) - blobberRequirements.Size = 6096 + blobberRequirements.Size = 64 * 1024 * 10 * 2 blobberRequirements.DataShards = 2 blobberRequirements.ParityShards = 2 allocationBlobbers := apiClient.GetAllocationBlobbers(t, wallet, &blobberRequirements, client.HttpOkStatus) @@ -155,7 +155,7 @@ func TestRepairAllocation(testSetup *testing.T) { t.RunSequentially("Repair allocation after copy should work", func(t *test.SystemTest) { blobberRequirements := model.DefaultBlobberRequirements(wallet.Id, wallet.PublicKey) - blobberRequirements.Size = 8096 + blobberRequirements.Size = 64 * 1024 * 20 * 2 blobberRequirements.DataShards = 2 blobberRequirements.ParityShards = 2 allocationBlobbers := apiClient.GetAllocationBlobbers(t, wallet, &blobberRequirements, client.HttpOkStatus) @@ -182,7 +182,7 @@ func TestRepairAllocation(testSetup *testing.T) { t.RunSequentially("Repair allocation after rename should work", func(t *test.SystemTest) { blobberRequirements := model.DefaultBlobberRequirements(wallet.Id, wallet.PublicKey) - blobberRequirements.Size = 6096 + blobberRequirements.Size = 64 * 1024 * 10 * 2 blobberRequirements.DataShards = 2 blobberRequirements.ParityShards = 2 allocationBlobbers := apiClient.GetAllocationBlobbers(t, wallet, &blobberRequirements, client.HttpOkStatus) @@ -350,6 +350,7 @@ func TestRepairAllocation(testSetup *testing.T) { func TestRepairSize(testSetup *testing.T) { t := test.NewSystemTest(testSetup) + t.Skip("Skipping as repair size is not implemented for V2") wallet := createWallet(t) sdkClient.SetWallet(t, wallet) apiClient.CreateReadPool(t, wallet, 0.5, client.TxSuccessfulStatus) diff --git a/tests/cli_tests/0_expired_allocation_test.go b/tests/cli_tests/0_expired_allocation_test.go index 426c719ce7..2df8a79bc7 100644 --- a/tests/cli_tests/0_expired_allocation_test.go +++ b/tests/cli_tests/0_expired_allocation_test.go @@ -71,7 +71,7 @@ func TestExpiredAllocation(testSetup *testing.T) { }) t.Run("Download File using Expired Allocation Should Fail", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/" diff --git a/tests/cli_tests/0_s3mgrt_migrate_test.go b/tests/cli_tests/0_s3mgrt_migrate_test.go index 74216ac5ba..5e9f992e0b 100644 --- a/tests/cli_tests/0_s3mgrt_migrate_test.go +++ b/tests/cli_tests/0_s3mgrt_migrate_test.go @@ -59,7 +59,7 @@ func Test0S3Migration(testSetup *testing.T) { }) t.RunSequentially("Should fail when bucket too large for allocation", func(t *test.SystemTest) { - allocSize := int64(5 * KB) + allocSize := int64(64 * KB) allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, }) diff --git a/tests/cli_tests/zboxcli_file_copy_test.go b/tests/cli_tests/zboxcli_file_copy_test.go index 2e86b5cf24..fea67410c7 100644 --- a/tests/cli_tests/zboxcli_file_copy_test.go +++ b/tests/cli_tests/zboxcli_file_copy_test.go @@ -27,7 +27,7 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i t.Parallel() t.Run("copy directory to another directry should work", func(t *test.SystemTest) { allocSize := int64(2048000) - fileSize := int64(256) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -178,7 +178,7 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i require.Equal(t, destpath+" directory created", output[0]) // Upload file - fileSize := int64(256) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err = createFileWithSize(file, fileSize) @@ -290,8 +290,8 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("copy file to existing directory", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2 * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -363,8 +363,8 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.RunWithTimeout("Copy file concurrently to existing directory, should work", 6*time.Minute, func(t *test.SystemTest) { // todo: way too slow - const allocSize int64 = 2048 - const fileSize int64 = 256 + const allocSize int64 = 64 * KB * 2 * 4 + const fileSize int64 = 64 * KB allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -446,8 +446,8 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("copy file to non-existing directory should work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2 * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -518,8 +518,8 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("copy file to same directory should fail", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2 * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -581,8 +581,8 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("copy file to dir with existing children should work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2 * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -644,8 +644,8 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("copy file to another directory with existing file with same name should fail", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2 * 4) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -757,8 +757,8 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i createWalletForName(nonAllocOwnerWallet) - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2 * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -864,8 +864,8 @@ func TestFileCopy(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("copy file with allocation copy file options forbidden should fail", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2 * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) diff --git a/tests/cli_tests/zboxcli_file_delete_test.go b/tests/cli_tests/zboxcli_file_delete_test.go index 414e0277fb..9f5bd54c3d 100644 --- a/tests/cli_tests/zboxcli_file_delete_test.go +++ b/tests/cli_tests/zboxcli_file_delete_test.go @@ -410,7 +410,7 @@ func TestFileDelete(testSetup *testing.T) { }) t.RunWithTimeout("Delete file concurrently in existing directory, should work", 5*time.Minute, func(t *test.SystemTest) { // TODO: slow - const allocSize int64 = 2048 + const allocSize int64 = 64 * KB * 2 * 2 const fileSize int64 = 256 allocationID := setupAllocation(t, configPath, map[string]interface{}{ diff --git a/tests/cli_tests/zboxcli_file_download_test.go b/tests/cli_tests/zboxcli_file_download_test.go index a855062a05..c896defc74 100644 --- a/tests/cli_tests/zboxcli_file_download_test.go +++ b/tests/cli_tests/zboxcli_file_download_test.go @@ -33,7 +33,7 @@ func TestDownload(testSetup *testing.T) { // Success Scenarios t.Run("Download File from Root Directory Should Work", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/" @@ -66,7 +66,7 @@ func TestDownload(testSetup *testing.T) { }) t.RunWithTimeout("Download File Concurrently Should Work from two Different Directory", 6*time.Minute, func(t *test.SystemTest) { - allocSize := int64(4096) + allocSize := int64(64 * KB * 4) filesize := int64(1024) remoteFilePaths := [2]string{"/dir1/", "/dir2/"} @@ -127,7 +127,7 @@ func TestDownload(testSetup *testing.T) { }) t.Run("Download File from a Directory Should Work", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/dir/" @@ -160,7 +160,7 @@ func TestDownload(testSetup *testing.T) { }) t.Run("Download File from Nested Directory Should Work", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/nested/dir/" @@ -193,7 +193,7 @@ func TestDownload(testSetup *testing.T) { }) t.RunWithTimeout("Download Entire Directory Should Work but does not see blobber/issues/588", 3*time.Minute, func(t *test.SystemTest) { // todo: slow - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/nested/dir/" @@ -227,7 +227,7 @@ func TestDownload(testSetup *testing.T) { // This test creates a separate wallet and allocates there, test nesting is required to create another wallet json file t.Run("Share Entire Folder from Another Wallet", func(t *test.SystemTest) { allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ - "size": 10 * 1024, + "size": 64 * KB * 2, "tokens": 9, }) filename = generateFileAndUpload(t, allocationID, remotepath, filesize) @@ -277,7 +277,7 @@ func TestDownload(testSetup *testing.T) { // This test creates a separate wallet and allocates there, test nesting is required to create another wallet json file t.Run("Share File from Another Wallet", func(t *test.SystemTest) { allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ - "size": 10 * 1024, + "size": 64 * KB * 2, "tokens": 9, }) filename = generateFileAndUpload(t, allocationID, remotepath, filesize) @@ -383,7 +383,7 @@ func TestDownload(testSetup *testing.T) { // This test creates a separate wallet and allocates there, test nesting is required to create another wallet json file t.Run("Share File from Another Wallet", func(t *test.SystemTest) { allocationID = setupAllocationAndReadLock(t, configPath, map[string]interface{}{ - "size": 10 * 1024, + "size": 64 * KB * 2, "tokens": 9, }) filename = generateFileAndUploadWithParam(t, allocationID, remotepath, filesize, map[string]interface{}{ @@ -448,7 +448,7 @@ func TestDownload(testSetup *testing.T) { // This test creates a separate wallet and allocates there, test nesting is required to create another wallet json file t.Run("Share File from Another Wallet", func(t *test.SystemTest) { allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ - "size": 10 * 1024, + "size": 64 * KB * 2, "tokens": 9, }) filename = generateFileAndUpload(t, allocationID, remotepath, filesize) @@ -504,7 +504,7 @@ func TestDownload(testSetup *testing.T) { // This test creates a separate wallet and allocates there, test nesting is required to create another wallet json file t.Run("Share File from Another Wallet", func(t *test.SystemTest) { allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ - "size": 10 * 1024, + "size": 64 * KB * 2, "tokens": 9, }) filename = generateFileAndUpload(t, allocationID, remotepath, filesize) @@ -565,7 +565,7 @@ func TestDownload(testSetup *testing.T) { // This test creates a separate wallet and allocates there, test nesting is required to create another wallet json file t.Run("Share File from Another Wallet", func(t *test.SystemTest) { allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ - "size": 10 * 1024, + "size": 64 * KB * 2, "tokens": 9, }) filename = generateFileAndUpload(t, allocationID, remotepath, filesize) @@ -613,7 +613,7 @@ func TestDownload(testSetup *testing.T) { // This test creates a separate wallet and allocates there, test nesting is required to create another wallet json file t.Run("Share File from Another Wallet", func(t *test.SystemTest) { allocationID = setupAllocation(t, configPath, map[string]interface{}{ - "size": 10 * 1024, + "size": 64 * KB * 2, "lock": 9, }) filename = generateFileAndUpload(t, allocationID, remotepath, filesize) @@ -652,7 +652,7 @@ func TestDownload(testSetup *testing.T) { }) t.Run("Download File Thumbnail Should Work", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/" @@ -695,7 +695,7 @@ func TestDownload(testSetup *testing.T) { }) t.Run("Download Encrypted File Thumbnail Should Work", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/" @@ -739,7 +739,7 @@ func TestDownload(testSetup *testing.T) { }) t.Run("Download to Non-Existent Path Should Work", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/" @@ -1079,7 +1079,7 @@ func TestDownload(testSetup *testing.T) { }) t.Run("Download File With blockspermarker Flag Should Work", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/" @@ -1132,7 +1132,7 @@ func TestDownload(testSetup *testing.T) { t.Run("Download File from Other's Allocation Should Fail", func(t *test.SystemTest) { var otherAllocationID, otherFilename string - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/" @@ -1165,7 +1165,7 @@ func TestDownload(testSetup *testing.T) { remotepath := "/" allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, "tokens": 9, }) @@ -1192,7 +1192,7 @@ func TestDownload(testSetup *testing.T) { t.Run("Download from Allocation without other Parameter Should Fail", func(t *test.SystemTest) { allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, "tokens": 9, }) @@ -1206,7 +1206,7 @@ func TestDownload(testSetup *testing.T) { }) t.RunWithTimeout("Download Moved File Should Work", 5*time.Minute, func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) filesize := int64(256) remotepath := "/" diff --git a/tests/cli_tests/zboxcli_file_meta_test.go b/tests/cli_tests/zboxcli_file_meta_test.go index 329831a0a8..74fe9484aa 100644 --- a/tests/cli_tests/zboxcli_file_meta_test.go +++ b/tests/cli_tests/zboxcli_file_meta_test.go @@ -53,12 +53,13 @@ func TestFileMetadata(testSetup *testing.T) { require.Equal(t, "d", meta.Type) require.Equal(t, "/", meta.Path) require.Equal(t, "/", meta.Name) - require.Equal(t, filesize, meta.ActualFileSize) + // ActualFileSize is not calculated for directories in v2 + // require.Equal(t, filesize, meta.ActualFileSize) }) t.Run("Get File Meta in Root Directory Should Work", func(t *test.SystemTest) { allocationID := setupAllocation(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, }) remotepath := "/" @@ -218,7 +219,7 @@ func TestFileMetadata(testSetup *testing.T) { t.Run("Get File Meta for Encrypted File Should Work", func(t *test.SystemTest) { allocationID := setupAllocation(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, }) // First Upload a file to the root directory @@ -291,7 +292,8 @@ func TestFileMetadata(testSetup *testing.T) { require.Equal(t, "d", meta.Type) require.Equal(t, remotepath, meta.Path) require.Equal(t, remotepath, meta.Name) - require.Equal(t, filesize, meta.ActualFileSize) + // ActualFileSize is not calculated for directories in v2 + // require.Equal(t, filesize, meta.ActualFileSize) }) filename := generateFileAndUpload(t, allocationID, remotepath, filesize) diff --git a/tests/cli_tests/zboxcli_file_move_test.go b/tests/cli_tests/zboxcli_file_move_test.go index 84d0689888..80586211c4 100644 --- a/tests/cli_tests/zboxcli_file_move_test.go +++ b/tests/cli_tests/zboxcli_file_move_test.go @@ -28,7 +28,7 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i t.Run("move root dir to child dir should work", func(t *test.SystemTest) { allocSize := int64(2048000) - fileSize := int64(256) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -96,8 +96,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("move nested dir to child dir should work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -165,8 +165,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("move dir with no file to child dir should work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -234,8 +234,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("move dir with multiple files to child dir should work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -303,8 +303,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("move file to existing directory", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -372,8 +372,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.RunWithTimeout("Move file concurrently to existing directory, should work", 10*time.Minute, func(t *test.SystemTest) { //todo:too slow - const allocSize int64 = 2048 - const fileSize int64 = 256 + const allocSize int64 = 64 * KB * 4 + const fileSize int64 = 64 * KB allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -455,8 +455,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("move file to non-existing directory should work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -578,8 +578,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("move file to same directory (no change) should fail", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -641,8 +641,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("move file to another directory with existing file with same name should fail", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 10) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -733,7 +733,7 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("move non-existing file should fail", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -755,8 +755,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i createWalletForName(nonAllocOwnerWallet) - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -862,8 +862,8 @@ func TestFileMove(testSetup *testing.T) { // nolint:gocyclo // team preference i }) t.Run("move file with allocation move file option forbidden should fail", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) diff --git a/tests/cli_tests/zboxcli_file_rename_test.go b/tests/cli_tests/zboxcli_file_rename_test.go index b7f0ce0b9f..8cad885d2b 100644 --- a/tests/cli_tests/zboxcli_file_rename_test.go +++ b/tests/cli_tests/zboxcli_file_rename_test.go @@ -28,7 +28,7 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference t.Parallel() t.Run("rename folder should work", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) remotePath := "/child" @@ -78,8 +78,8 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) t.Run("rename file should work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -147,8 +147,8 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) t.RunWithTimeout("Rename file concurrently to existing directory, should work", 6*time.Minute, func(t *test.SystemTest) { // todo: slow - const allocSize int64 = 2048 - const fileSize int64 = 256 + const allocSize int64 = 64 * KB * 4 + const fileSize int64 = 64 * KB allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -216,8 +216,8 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) t.Run("rename file to same filename (no change) shouldn't work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -277,8 +277,8 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) t.Run("rename file to with 90-char (below 100-char filename limit)", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -352,8 +352,8 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) t.Run("rename file to with 160-char (above 150-char filename limit) should fail", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -426,8 +426,8 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) t.Run("rename file to containing special characters", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -543,7 +543,7 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) t.Run("rename root path should fail", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) remotePath := "/" destName := "new_" @@ -563,7 +563,7 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) //todo: too slow t.Run("rename non-existing file should fail", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -585,8 +585,8 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference createWalletForName(nonAllocOwnerWallet) - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -741,8 +741,8 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) t.Run("rename file with allocation rename file option forbidden should fail", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(256) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) file := generateRandomTestFileName(t) err := createFileWithSize(file, fileSize) @@ -784,8 +784,8 @@ func TestFileRename(testSetup *testing.T) { // nolint:gocyclo // team preference }) t.RunWithTimeout("Rename and delete file concurrently, should work", 6*time.Minute, func(t *test.SystemTest) { // todo: unacceptably slow - const allocSize int64 = 2048 - const fileSize int64 = 256 + const allocSize int64 = 64 * KB * 8 + const fileSize int64 = 64 * KB allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, diff --git a/tests/cli_tests/zboxcli_file_upload_test.go b/tests/cli_tests/zboxcli_file_upload_test.go index 8a18fd235d..aa47328011 100644 --- a/tests/cli_tests/zboxcli_file_upload_test.go +++ b/tests/cli_tests/zboxcli_file_upload_test.go @@ -95,8 +95,8 @@ func TestUpload(testSetup *testing.T) { }) t.Run("Upload File to Root Directory Should Work", func(t *test.SystemTest) { // todo: slow - const allocSize int64 = 2048 - const fileSize int64 = 256 + const allocSize int64 = 64 * KB * 2 + const fileSize int64 = 64 * KB allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -122,8 +122,8 @@ func TestUpload(testSetup *testing.T) { }) t.RunWithTimeout("Upload file concurrently to root directory, should work", 6*time.Minute, func(t *test.SystemTest) { // todo: slow - const allocSize int64 = 2048 - const fileSize int64 = 256 + const allocSize int64 = 64 * KB * 4 + const fileSize int64 = 64 * KB allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -172,8 +172,8 @@ func TestUpload(testSetup *testing.T) { }) t.Run("Upload File to a Directory Should Work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(1024) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -199,8 +199,8 @@ func TestUpload(testSetup *testing.T) { }) t.RunWithTimeout("Upload File to a Directory without Filename Should Work", 60*time.Second, func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(1024) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -244,8 +244,8 @@ func TestUpload(testSetup *testing.T) { }) t.Run("Upload File to Nested Directory Should Work", func(t *test.SystemTest) { - allocSize := int64(2048) - fileSize := int64(1024) + allocSize := int64(64 * KB * 2) + fileSize := int64(64 * KB) allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -271,8 +271,8 @@ func TestUpload(testSetup *testing.T) { }) t.Run("Upload File with Thumbnail Should Work", func(t *test.SystemTest) { - allocSize := int64(10 * 1024 * 1024) - fileSize := int64(256) + allocSize := int64(64 * 1024 * 1024) + fileSize := int64(64 * KB) allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -350,7 +350,7 @@ func TestUpload(testSetup *testing.T) { }) t.Run("Upload Image File Should Work", func(t *test.SystemTest) { - allocSize := int64(10 * 1024 * 1024) + allocSize := int64(64 * 1024 * 1024) allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -431,7 +431,7 @@ func TestUpload(testSetup *testing.T) { t.Run("Upload File with Encryption Should Work", func(t *test.SystemTest) { allocationID := setupAllocation(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, }) filename := generateRandomTestFileName(t) @@ -528,7 +528,7 @@ func TestUpload(testSetup *testing.T) { }) t.Run("Upload File to Existing File Should Fail", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) fileSize := int64(1024) allocationID := setupAllocation(t, configPath, map[string]interface{}{ @@ -588,7 +588,7 @@ func TestUpload(testSetup *testing.T) { t.Run("Upload File to Other's Allocation Should Fail", func(t *test.SystemTest) { var otherAllocationID string - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) fileSize := int64(256) allocationID := setupAllocation(t, configPath, map[string]interface{}{ @@ -633,7 +633,7 @@ func TestUpload(testSetup *testing.T) { }) t.Run("Upload Non-Existent File Should Fail", func(t *test.SystemTest) { - allocSize := int64(2048) + allocSize := int64(64 * KB * 2) allocationID := setupAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -668,7 +668,7 @@ func TestUpload(testSetup *testing.T) { t.Run("Upload to Allocation without remotepath and authticket Should Fail", func(t *test.SystemTest) { allocationID := setupAllocation(t, configPath, map[string]interface{}{ - "size": 2048, + "size": 64 * KB * 2, }) output, err := uploadFileWithoutRetry(t, configPath, map[string]interface{}{ diff --git a/tests/cli_tests/zboxcli_list_file_test.go b/tests/cli_tests/zboxcli_list_file_test.go index b677abb18e..cf2b848be2 100644 --- a/tests/cli_tests/zboxcli_list_file_test.go +++ b/tests/cli_tests/zboxcli_list_file_test.go @@ -83,7 +83,7 @@ func TestListFileSystem(testSetup *testing.T) { //FIXME: POSSIBLE BUG: Encrypted file require much more space t.Run("List Encrypted Files Should Work", func(t *test.SystemTest) { allocationID := setupAllocation(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, }) // First Upload a file to the root directory diff --git a/tests/cli_tests/zboxcli_recent_refs_test.go b/tests/cli_tests/zboxcli_recent_refs_test.go index 17e44379fb..ce3744073e 100644 --- a/tests/cli_tests/zboxcli_recent_refs_test.go +++ b/tests/cli_tests/zboxcli_recent_refs_test.go @@ -31,7 +31,7 @@ func TestRecentlyAddedRefs(testSetup *testing.T) { t.Run("Recently Added Refs Should be listed", func(t *test.SystemTest) { //todo: slow allocationID := setupAllocation(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, }) t.Logf("Allocation: %s", allocationID) @@ -89,7 +89,7 @@ func TestRecentlyAddedRefs(testSetup *testing.T) { t.Run("Refs created 30 seconds ago should not be listed with in-date less than 30 seconds", func(t *test.SystemTest) { allocationID := setupAllocation(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, }) fileSize := int64(10) @@ -132,7 +132,7 @@ func TestRecentlyAddedRefs(testSetup *testing.T) { t.Run("Refs of someone else's allocation should return zero refs", func(t *test.SystemTest) { //todo: slow allocationID := setupAllocation(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, }) fileSize := int64(10) @@ -178,7 +178,7 @@ func TestRecentlyAddedRefs(testSetup *testing.T) { t.Run("Invalid parameters should return error", func(t *test.SystemTest) { allocationID := setupAllocation(t, configPath, map[string]interface{}{ - "size": 10000, + "size": 64 * KB * 2, }) output, err := listRecentlyAddedRefs(t, configPath, createParams(map[string]interface{}{ diff --git a/tests/cli_tests/zboxcli_restricted_blobber_test.go b/tests/cli_tests/zboxcli_restricted_blobber_test.go index c9b04a8f65..d707df9f01 100644 --- a/tests/cli_tests/zboxcli_restricted_blobber_test.go +++ b/tests/cli_tests/zboxcli_restricted_blobber_test.go @@ -177,7 +177,7 @@ func TestRestrictedBlobbers(testSetup *testing.T) { t.RunSequentially("Update allocation with add restricted blobber should succeed", func(t *test.SystemTest) { // setup allocation and upload a file - allocSize := int64(4096) + allocSize := int64(64 * KB * 2) fileSize := int64(1024) allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ @@ -246,7 +246,7 @@ func TestRestrictedBlobbers(testSetup *testing.T) { t.RunSequentially("Update allocation with replace blobber and add restricted blobber should succeed", func(t *test.SystemTest) { // setup allocation and upload a file - allocSize := int64(4096) + allocSize := int64(64 * KB * 2) fileSize := int64(1024) allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ diff --git a/tests/cli_tests/zboxcli_rollback_test.go b/tests/cli_tests/zboxcli_rollback_test.go index bdf20fcecb..267957d048 100644 --- a/tests/cli_tests/zboxcli_rollback_test.go +++ b/tests/cli_tests/zboxcli_rollback_test.go @@ -206,7 +206,8 @@ func TestRollbackAllocation(testSetup *testing.T) { }) t.Run("rollback allocation after moving a file should work", func(t *test.SystemTest) { - allocSize := int64(2048) + t.Skip("Skipping as move is not atomic in v2") + allocSize := int64(64 * KB * 2) fileSize := int64(256) file := generateRandomTestFileName(t) @@ -310,7 +311,8 @@ func TestRollbackAllocation(testSetup *testing.T) { }) t.Run("rollback allocation after renaming a file should work", func(t *test.SystemTest) { - allocSize := int64(2048) + t.Skip("rename is not atomic in v2") + allocSize := int64(64 * KB * 2) fileSize := int64(256) file := generateRandomTestFileName(t) diff --git a/tests/cli_tests/zboxcli_update_allocation_test.go b/tests/cli_tests/zboxcli_update_allocation_test.go index 47b882816f..a6b0c3b498 100644 --- a/tests/cli_tests/zboxcli_update_allocation_test.go +++ b/tests/cli_tests/zboxcli_update_allocation_test.go @@ -675,7 +675,7 @@ func TestUpdateAllocation(testSetup *testing.T) { t.Run("Update allocation with add blobber should succeed", func(t *test.SystemTest) { // setup allocation and upload a file - allocSize := int64(4096) + allocSize := int64(64 * KB * 2) fileSize := int64(1024) allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ @@ -720,7 +720,7 @@ func TestUpdateAllocation(testSetup *testing.T) { t.Run("Update allocation with replace blobber should succeed", func(t *test.SystemTest) { // setup allocation and upload a file - allocSize := int64(4096) + allocSize := int64(64 * KB * 2) fileSize := int64(1024) allocationID := setupAllocationAndReadLock(t, configPath, map[string]interface{}{ diff --git a/tests/tokenomics_tests/enterprise_blobber_update_allocation_test.go b/tests/tokenomics_tests/enterprise_blobber_update_allocation_test.go index 72681d6565..f3fe460786 100644 --- a/tests/tokenomics_tests/enterprise_blobber_update_allocation_test.go +++ b/tests/tokenomics_tests/enterprise_blobber_update_allocation_test.go @@ -983,7 +983,7 @@ func TestUpdateEnterpriseAllocation(testSetup *testing.T) { output, err := utils.CreateWallet(t, configPath) require.Nil(t, err, "Error creating wallet", strings.Join(output, "\n")) - allocSize := int64(4096) + allocSize := int64(64 * KB * 2) allocationID := utils.SetupEnterpriseAllocation(t, configPath, map[string]interface{}{ "size": allocSize, @@ -1020,7 +1020,7 @@ func TestUpdateEnterpriseAllocation(testSetup *testing.T) { output, err := utils.CreateWallet(t, configPath) require.Nil(t, err, "Error creating wallet %v", strings.Join(output, "\n")) - allocSize := int64(4096) + allocSize := int64(64 * KB * 2) fileSize := int64(1024) allocationID := utils.SetupEnterpriseAllocationAndReadLock(t, configPath, map[string]interface{}{