Skip to content

Commit

Permalink
[Housekeeping] Enable lint flytecopilot (#6003)
Browse files Browse the repository at this point in the history
* [Housekeeping] Enable lint flytecopilot

Signed-off-by: Wei-Yu Kao <115421902+wayner0628@users.noreply.github.com>

* Fix remaining lint warnings

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>

---------

Signed-off-by: Wei-Yu Kao <115421902+wayner0628@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Co-authored-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
  • Loading branch information
wayner0628 and eapolinario authored Nov 14, 2024
1 parent da220be commit 3c7b88c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
component:
- datacatalog
- flyteadmin
# TODO(monorepo): Enable lint flytecopilot
# - flytecopilot
- flytecopilot
- flytectl
- flyteidl
- flyteplugins
Expand Down
13 changes: 8 additions & 5 deletions flytecopilot/data/download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ import (
"path/filepath"
"testing"

"github.com/stretchr/testify/assert"

"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"
"github.com/flyteorg/flyte/flytestdlib/promutils"
"github.com/flyteorg/flyte/flytestdlib/storage"

"github.com/stretchr/testify/assert"
)

func TestHandleBlobMultipart(t *testing.T) {
t.Run("Successful Query", func(t *testing.T) {
s, err := storage.NewDataStore(&storage.Config{Type: storage.TypeMemory}, promutils.NewTestScope())
assert.NoError(t, err)
ref := storage.DataReference("s3://container/folder/file1")
s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{}))
err = s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{}))
assert.NoError(t, err)
ref = storage.DataReference("s3://container/folder/file2")
s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{}))
err = s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{}))
assert.NoError(t, err)

d := Downloader{store: s}

Expand Down Expand Up @@ -87,7 +89,8 @@ func TestHandleBlobSinglePart(t *testing.T) {
s, err := storage.NewDataStore(&storage.Config{Type: storage.TypeMemory}, promutils.NewTestScope())
assert.NoError(t, err)
ref := storage.DataReference("s3://container/file")
s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{}))
err = s.WriteRaw(context.Background(), ref, 0, storage.Options{}, bytes.NewReader([]byte{}))
assert.NoError(t, err)

d := Downloader{store: s}

Expand Down

0 comments on commit 3c7b88c

Please sign in to comment.