Skip to content

Commit

Permalink
gl-testing: Add assertion on response type
Browse files Browse the repository at this point in the history
We expect a signer response during the pairing procedure. This adds an
extra assertion to help track down issues in the future.

Signed-off-by: Peter Neuroth <[email protected]>
  • Loading branch information
nepet committed Jul 24, 2024
1 parent e8a6a53 commit b086193
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/gl-testing/gltesting/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ async def PairDevice(self, req: schedpb.PairDeviceRequest):
self.sessions[req.session_id] = data

# Wait for the Approval from the signer.
await self.recv_once(self.stream_in)
data = await self.recv_once(self.stream_in)
assert(isinstance(data, schedpb.SignerResponse))

device_cert = certs.gencert_from_csr(req.csr, recover=False, pairing=True)
return schedpb.PairDeviceResponse(
Expand Down

0 comments on commit b086193

Please sign in to comment.