Skip to content

Commit

Permalink
change to discoveries
Browse files Browse the repository at this point in the history
  • Loading branch information
martha-johnston committed Jan 8, 2025
1 parent ca1dfb3 commit ab231ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/services/discovery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DiscoveryClient extends Resource implements ResourceRPCClient {
Future<List<ComponentConfig>> discoverResources(String discoveryName, {Map<String, dynamic>? extra}) async {
final request = DiscoverResourcesRequest(name: name, extra: extra?.toStruct());
final response = await client.discoverResources(request);
return response.discovery;
return response.discoveries;
}

@override
Expand Down
2 changes: 1 addition & 1 deletion test/unit_test/services/discovery_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void main() {
test('discoverResources', () async {
final expected = [ComponentConfig()];
when(serviceClient.discoverResources(any))
.thenAnswer((_) => MockResponseFuture.value(DiscoverResourcesResponse(discovery: expected)));
.thenAnswer((_) => MockResponseFuture.value(DiscoverResourcesResponse(discoveries: expected)));
final response = await client.discoverResources('discoveryName');
expect(response, equals(expected));
});
Expand Down

0 comments on commit ab231ef

Please sign in to comment.