[#137] Add index page support
All checks were successful
/ DCO (pull_request) Successful in 53s
/ Vulncheck (pull_request) Successful in 1m29s
/ Builds (pull_request) Successful in 1m43s
/ Lint (pull_request) Successful in 2m57s
/ Tests (pull_request) Successful in 1m16s

Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
This commit is contained in:
Nikita Zinkevich 2024-09-26 17:32:27 +03:00
parent 77eb474581
commit 8fe8f2dcc2
20 changed files with 738 additions and 80 deletions

View file

@ -24,8 +24,8 @@ type nodeResponse struct {
timestamp uint64
}
func (n nodeResponse) GetTimestamp() uint64 {
return n.timestamp
func (n nodeResponse) GetTimestamp() []uint64 {
return []uint64{n.timestamp}
}
func (n nodeResponse) GetMeta() []Meta {
@ -36,6 +36,13 @@ func (n nodeResponse) GetMeta() []Meta {
return res
}
func (n nodeResponse) GetNodeID() []uint64 {
return nil
}
func (n nodeResponse) GetParentID() []uint64 {
return nil
}
func TestGetLatestNode(t *testing.T) {
for _, tc := range []struct {
name string
@ -130,7 +137,7 @@ func TestGetLatestNode(t *testing.T) {
},
} {
t.Run(tc.name, func(t *testing.T) {
actualNode, err := getLatestNode(tc.nodes)
actualNode, err := getLatestVersionNode(tc.nodes)
if tc.error {
require.Error(t, err)
return