diff --git a/internal/api/model/api.go b/internal/api/model/api.go index f749419419..88c15f4868 100644 --- a/internal/api/model/api.go +++ b/internal/api/model/api.go @@ -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 { diff --git a/tests/api_tests/blobber_objecttree_test.go b/tests/api_tests/blobber_objecttree_test.go index 0c6c546b33..fdbe29facd 100644 --- a/tests/api_tests/blobber_objecttree_test.go +++ b/tests/api_tests/blobber_objecttree_test.go @@ -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 }) @@ -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 }) diff --git a/tests/api_tests/blobber_referencepath_test.go b/tests/api_tests/blobber_referencepath_test.go index 684c5df6d4..e9bad53dc0 100644 --- a/tests/api_tests/blobber_referencepath_test.go +++ b/tests/api_tests/blobber_referencepath_test.go @@ -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 }) @@ -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 })