Skip to content

Commit

Permalink
Don't include node version's status reason in ListAllNodes (#123)
Browse files Browse the repository at this point in the history
* Don't include status reason in list nodes.

* Fixed tests.
  • Loading branch information
robinjhuang authored Jan 6, 2025
1 parent 5753550 commit b200f30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration-tests/registry_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ func TestRegistryNodeVersion(t *testing.T) {
expectedNode.LatestVersion.DownloadUrl = node.LatestVersion.DownloadUrl // generated
expectedNode.LatestVersion.Deprecated = node.LatestVersion.Deprecated // generated
expectedNode.LatestVersion.CreatedAt = node.LatestVersion.CreatedAt // generated
expectedNode.LatestVersion.StatusReason = nil // Filtered out
expectedNode.Publisher.CreatedAt = node.Publisher.CreatedAt
assert.Equal(t, expectedNode, node)
}
Expand Down
1 change: 1 addition & 0 deletions server/implementation/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ func (s *DripStrictServerImplementation) ListAllNodes(
// attach information of latest version if available
if len(dbNode.Edges.Versions) > 0 {
apiNode.LatestVersion = mapper.DbNodeVersionToApiNodeVersion(dbNode.Edges.Versions[0])
apiNode.LatestVersion.StatusReason = nil
}

// Map publisher information
Expand Down

0 comments on commit b200f30

Please sign in to comment.