Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete OOB utility function #47

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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