Skip to content

Commit

Permalink
fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
hexaforce committed Feb 12, 2025
1 parent 7040db0 commit 337125f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/e2e/gql_asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func TestCoreSupportGetAssets(t *testing.T) {
}.Wrap(),
})
assert.Nil(t, err)
assert.Equal(t, len(as), 3)
assert.Equal(t, len(as), 4)

res = getAssets(e, teamId, nil)
assets := res.Path("$.data.assets.nodes").Array().Iter()
Expand Down
6 changes: 3 additions & 3 deletions server/internal/infrastructure/fs/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ func TestFSFile_UploadAssetFromURL(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
testGCS.UploadTestData(srcBucket, tc.fileName)

fsBaseURL := "/assets"
newFileRepo, err := NewFile(mockFs(), fsBaseURL)
// fsBaseURL := "/assets"
newFileRepo, err := NewFile(mockFs(), "")
assert.NoError(t, err)

srcURL, _ := url.Parse(fmt.Sprintf("%s/%s", tc.filePath, tc.fileName))
Expand Down Expand Up @@ -313,7 +313,7 @@ func TestFile_RemoveBuiltScene(t *testing.T) {
func TestGetAssetFileURL(t *testing.T) {
e, err := url.Parse("http://hoge.com/assets/xxx.yyy")
assert.NoError(t, err)
b, err := url.Parse("http://hoge.com/assets")
b, err := url.Parse("http://hoge.com/")
assert.NoError(t, err)
assert.Equal(t, e, getAssetFileURL(b, "xxx.yyy"))
}
Expand Down

0 comments on commit 337125f

Please sign in to comment.