Skip to content

Commit

Permalink
make AgentInfoSigned opaque and confirm equality in test
Browse files Browse the repository at this point in the history
  • Loading branch information
zippy committed Dec 5, 2020
1 parent 4bc54c7 commit 49a4371
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/api/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ export type ListCellIdsResponse = Array<CellId>
export type ListActiveAppsRequest = void
export type ListActiveAppsResponse = Array<InstalledAppId>

export type AgentInfoSigned = {
agent: AgentPubKey,
signature: any, // don't yet have a type for signatures
agent_info: any, // don't yet have a type for agent_info
}
// this type is meant to be opaque
export type AgentInfoSigned = any
/*{
agent: any,
signature: any,
agent_info: any,
}*/

export type RequestAgentInfoRequest = { cell_id: CellId|null }
export type RequestAgentInfoResponse = Array<AgentInfoSigned>
Expand Down
1 change: 1 addition & 0 deletions test/e2e/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ test('can inject agents', async (t) => {
await admin2.addAgentInfo({ agent_infos: conductor1_agentInfo });
conductor2_agentInfo = await admin2.requestAgentInfo({cell_id: null});
t.equal(conductor2_agentInfo.length, 1)
t.deepEqual(conductor1_agentInfo,conductor2_agentInfo)

// now install the app and activate it on agent 2.
result = await admin2.installApp({
Expand Down

0 comments on commit 49a4371

Please sign in to comment.