mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-14 20:03:42 +00:00
Added support for chunked uploads. (#1208)
* Added tests for mid-size and big artifacts, reproducing a problem with chunked uploads. * Added support for chunked uploads. * Enforced overwriting uploaded artifacts on receiving the first chunk. Co-authored-by: Casey Lee <[email protected]>
This commit is contained in:
1 parent
1d4c2aaa3f
commit
7105919f0c
3 files changed
+126
-3
No files matched your search
@@ -51,6 +51,16 @@ func (fsys MapFsImpl) Open(path string) (fs.File, error) {
|
||||
return WritableFile{result, fsys.MapFS, path}, err
|
||||
}
|
||||
|
||||
func (fsys MapFsImpl) OpenAtEnd(path string) (fs.File, error) {
|
||||
var file = fstest.MapFile{
|
||||
Data: []byte("content2"),
|
||||
}
|
||||
fsys.MapFS[path] = &file
|
||||
|
||||
result, err := fsys.MapFS.Open(path)
|
||||
return WritableFile{result, fsys.MapFS, path}, err
|
||||
}
|
||||
|
||||
func TestNewArtifactUploadPrepare(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
|
||||
Reference in new issue
Block a user