-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(cts): add tests for chunkedBatch wrappers #3268
Conversation
🔨 The codegen job will run at the end of the CI.Make sure your last commit does not contain generated code, it will be automatically pushed by our CI. |
✔️ Code generated!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome
copyCount: 2, | ||
batchCount: 10, | ||
waitTaskCount: 6, | ||
tmpIndexName: req.params.indexName, | ||
waitingForFinalWaitTask: false, | ||
successful: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
next up: JSON based generator for the test server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coming soon ™️ !
@@ -1,5 +1,5 @@ | |||
method: | |||
post: | |||
get: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a post, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its neither, its a helper, there is no method associated with it, but for consistency I put get
everywhere.
For now it doesn't really matter but if in the script we expect all helpers
to be GET
it makes like easier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for example for replaceAllObjects
that call multiple endpoints its not possible to tell what is the method, its only here to comply with redocly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup it's just that it seems wrong when reading the specs, we should maybe just add a disclaimer somewhere that those specs are only for generating models (like in the folder root directory)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do in next PR !
@@ -265,7 +265,7 @@ | |||
""" | |||
Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunked_batch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it. | |||
""" | |||
return await self.chunked_batch(index_name=index_name, objects=objects, action=Action.PARTIALUPDATEOBJECT and create_if_not_exists or Action.PARTIALUPDATEOBJECTNOCREATE) | |||
return await self.chunked_batch(index_name=index_name, objects=objects, action=Action.PARTIALUPDATEOBJECT if create_if_not_exists else Action.PARTIALUPDATEOBJECTNOCREATE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possessed by lua
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good for me then, gg for the fixes along the way!
🧭 What and Why
🎟 JIRA Ticket: DI-2506
Generate helpers for all the wrapper helpers and assert the requests with a mock server