Skip to content

Commit

Permalink
Merge pull request #1068 from 0chain/feat/ignore-ref
Browse files Browse the repository at this point in the history
change refpath response
  • Loading branch information
dabasov authored Jun 2, 2024
2 parents cdb5698 + 5866d79 commit 9129c28
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion internal/api/model/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,6 @@ type Ref struct {
type BlobberFileRefPathResponse struct {
Meta map[string]interface{} `json:"meta_data"`
List []*BlobberFileRefPathResponse `json:"list,omitempty"`
Ref *Ref
}

type WriteMarker struct {
Expand Down
6 changes: 3 additions & 3 deletions tests/api_tests/blobber_objecttree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func TestObjectTree(testSetup *testing.T) {
require.Nil(t, err)
require.NotNil(t, blobberObjectTreeResponse)
require.Equal(t, resp.StatusCode(), client.HttpOkStatus, resp)
require.Equal(t, blobberObjectTreeResponse.Ref.Path, remoteFilePath)
require.Equal(t, blobberObjectTreeResponse.Ref.Type, "f")
require.Equal(t, blobberObjectTreeResponse.Meta["path"].(string), remoteFilePath)
require.Equal(t, blobberObjectTreeResponse.Meta["type"].(string), "f")

// TODO add more assertions once there blobber endpoints are documented
})
Expand Down Expand Up @@ -78,7 +78,7 @@ func TestObjectTree(testSetup *testing.T) {
require.Nil(t, err)
require.NotNil(t, blobberObjectTreeResponse)
require.Equal(t, resp.StatusCode(), client.HttpOkStatus, resp)
require.NotNil(t, blobberObjectTreeResponse.Ref)
require.NotNil(t, blobberObjectTreeResponse.Meta)

// TODO add more assertions once there blobber endpoints are documented
})
Expand Down
10 changes: 5 additions & 5 deletions tests/api_tests/blobber_referencepath_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ func TestFileReferencePath(testSetup *testing.T) {
require.Nil(t, err)
require.NotNil(t, blobberFileRefsResponse)
require.Equal(t, resp.StatusCode(), client.HttpOkStatus, resp)
require.Equal(t, blobberFileRefsResponse.Ref.Path, "/")
require.NotEmpty(t, blobberFileRefsResponse.Ref.Children)
require.Equal(t, blobberFileRefsResponse.Ref.Children[0].Path, remoteFilePath)
require.Equal(t, blobberFileRefsResponse.Ref.Children[0].Type, "f")
require.Equal(t, blobberFileRefsResponse.Meta["path"].(string), "/")
require.NotEmpty(t, blobberFileRefsResponse.List)
require.Equal(t, blobberFileRefsResponse.List[0].Meta["path"].(string), remoteFilePath)
require.Equal(t, blobberFileRefsResponse.List[0].Meta["type"], "f")

// TODO add more assertions once there blobber endpoints are documented
})
Expand Down Expand Up @@ -80,7 +80,7 @@ func TestFileReferencePath(testSetup *testing.T) {
require.Nil(t, err)
require.NotNil(t, blobberFileRefsResponse)
require.Equal(t, resp.StatusCode(), client.HttpOkStatus, resp)
require.NotNil(t, blobberFileRefsResponse.Ref)
require.NotNil(t, blobberFileRefsResponse.Meta)

// TODO add more assertions once there blobber endpoints are documented
})
Expand Down

0 comments on commit 9129c28

Please sign in to comment.