fix(uploads): serve private previews through API and show batch cover status
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m30s
ci / ts / ts (packages + web) (push) Canceled after 4m13s
ci / module boundaries / boundaries (push) Successful in 8s
ci / api / api (push) Successful in 56s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 1m1s
ci / db / db (push) Successful in 1m7s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m30s
ci / ts / ts (packages + web) (push) Canceled after 4m13s
ci / module boundaries / boundaries (push) Successful in 8s
ci / api / api (push) Successful in 56s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 1m1s
ci / db / db (push) Successful in 1m7s
This commit is contained in:
1 parent
37e33c656b
commit
7d62531c02
15 files changed
+533
-410
No files matched your search
@@ -23,6 +23,20 @@ import (
|
||||
|
||||
type failingReader struct{ err error }
|
||||
|
||||
func TestBatchCoverPresenceInFileDTO(t *testing.T) {
|
||||
h := NewHandler(nil, nil)
|
||||
for _, tc := range []struct {
|
||||
path *string
|
||||
want bool
|
||||
}{
|
||||
{nil, false}, {nullable(""), false}, {nullable("covers/album.jpg"), true},
|
||||
} {
|
||||
got := h.fileDTO(context.Background(), File{CoverPath: tc.path})
|
||||
require.NotNil(t, got.BatchHasCover)
|
||||
require.Equal(t, tc.want, *got.BatchHasCover)
|
||||
}
|
||||
}
|
||||
|
||||
func (r failingReader) Read([]byte) (int, error) { return 0, r.err }
|
||||
|
||||
func TestTusInterruptedWriteCanResume(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user