Add idempotency key for create
This commit is contained in:
parent
a63903734d
commit
ae590e6fc8
35 changed files with 624 additions and 143 deletions
|
|
@ -83,18 +83,18 @@ export class MockClient extends debugging.InMemoryFileSystem {
|
|||
.map((part) => part.trim());
|
||||
const newParts = newContent.split(" ").map((part) => part.trim());
|
||||
existingParts.forEach((part) =>
|
||||
// all changes should be additive
|
||||
{
|
||||
assert(
|
||||
newParts.includes(part),
|
||||
`Part ${part} not found in new content: ${newContent}`
|
||||
);
|
||||
}
|
||||
// all changes should be additive
|
||||
{
|
||||
assert(
|
||||
newParts.includes(part),
|
||||
`Part ${part} not found in new content: '${newContent}'`
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
this.client.logger.info(
|
||||
`Updated file ${path} with:\n current content: ${currentContent}\n new content: ${newContent}`
|
||||
`Updated file ${path} with:\n current content: '${currentContent}'\n new content: '${newContent}'`
|
||||
);
|
||||
|
||||
this.executeFileOperation(
|
||||
|
|
@ -137,7 +137,7 @@ export class MockClient extends debugging.InMemoryFileSystem {
|
|||
}
|
||||
): Promise<void> {
|
||||
this.client.logger.info(
|
||||
`Deleting file: ${path} with:\n content ${new TextDecoder().decode(this.files.get(path))}`
|
||||
`Deleting file: ${path} with:\n content '${new TextDecoder().decode(this.files.get(path))}'`
|
||||
);
|
||||
this.files.delete(path);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue