|
49 | 49 | from viam.resource.registry import Registry
|
50 | 50 | from viam.resource.rpc_client_base import ResourceRPCClientBase
|
51 | 51 | from viam.resource.types import RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT, RESOURCE_TYPE_SERVICE
|
52 |
| -from viam.robot.client import RobotClient |
| 52 | +from viam.robot.client import RobotClient, CloudMetadata |
53 | 53 | from viam.robot.service import RobotService
|
54 | 54 | from viam.services.motion.client import MotionClient
|
55 | 55 | from viam.utils import dict_to_struct, message_to_struct, struct_to_message
|
|
143 | 143 | OPERATIONS_RESPONSE = [Operation(id=OPERATION_ID)]
|
144 | 144 |
|
145 | 145 | GET_CLOUD_METADATA_RESPONSE = GetCloudMetadataResponse(
|
146 |
| - robot_part_id="the-robot-part", |
| 146 | + robot_part_id="the-machine-id", |
147 | 147 | primary_org_id="the-primary-org",
|
148 | 148 | location_id="the-location",
|
| 149 | + machine_id="the-machine-id", |
| 150 | + machine_part_id="the-machine-part-id", |
149 | 151 | )
|
150 | 152 |
|
151 | 153 |
|
@@ -426,7 +428,12 @@ async def test_get_cloud_metadata(self, service: RobotService):
|
426 | 428 | async with ChannelFor([service]) as channel:
|
427 | 429 | client = await RobotClient.with_channel(channel, RobotClient.Options())
|
428 | 430 | md = await client.get_cloud_metadata()
|
429 |
| - assert md == GET_CLOUD_METADATA_RESPONSE |
| 431 | + assert md == CloudMetadata( |
| 432 | + primary_org_id=GET_CLOUD_METADATA_RESPONSE.primary_org_id, |
| 433 | + location_id=GET_CLOUD_METADATA_RESPONSE.location_id, |
| 434 | + machine_id=GET_CLOUD_METADATA_RESPONSE.machine_id, |
| 435 | + machine_part_id=GET_CLOUD_METADATA_RESPONSE.machine_part_id, |
| 436 | + ) |
430 | 437 | await client.close()
|
431 | 438 |
|
432 | 439 | @pytest.mark.asyncio
|
|
0 commit comments