Skip to content

Commit

Permalink
Merge pull request #47 from loneil/feature/deleteOob
Browse files Browse the repository at this point in the history
Delete OOB utility function
  • Loading branch information
KimEbert42 committed Mar 25, 2024
2 parents beb2288 + ebbe208 commit c476335
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions load-agent/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ const pingMediator = async (agent) => {
}
}

let deleteOobRecordById = async (agent, id) => {
await agent.oob.deleteById(id);
};

let receiveInvitation = async (agent, invitationUrl) => {
// wait for the connection
let timeout = config.verified_timeout_seconds * 1000
Expand Down Expand Up @@ -578,6 +582,12 @@ rl.on('line', async (line) => {
process.stdout.write(
JSON.stringify({ error: 0, result: 'Ping Mediator' }) + '\n'
)
} else if (command['cmd'] == 'deleteOobRecordById') {
await deleteOobRecordById(agent, command['id'])

process.stdout.write(
JSON.stringify({ error: 0, result: 'Delete OOB Record' }) + '\n'
)
} else if (command['cmd'] == 'receiveInvitation') {
let connection = await receiveInvitation(agent, command['invitationUrl'])

Expand Down
6 changes: 6 additions & 0 deletions load-agent/locustClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,12 @@ def issuer_getinvite(self):
def issuer_getliveness(self):
return self.issuer.is_up()

@stopwatch
def delete_oob(self, id):
self.run_command({"cmd": "deleteOobRecordById", "id": id})

line = self.readjsonline()

@stopwatch
def accept_invite(self, invite, useConnectionDid=False):
try:
Expand Down

0 comments on commit c476335

Please sign in to comment.