validator: add Alternator index creation test#452
Conversation
517fb7c to
7e14300
Compare
|
As requested I am splitting #392 into smaller commits. |
7e14300 to
52fffc0
Compare
Introduce the Alternator integration test suite with shared infrastructure (TableShape, Naming patterns, Injectors for customized AWS SDK calls) and test for basic table and index lifecycle operations: CreateTable, DescribeTable, DeleteTable.
52fffc0 to
40fe5ef
Compare
QuerthDP
left a comment
There was a problem hiding this comment.
Looks good.
Feel free to resolve my comments without any changes if you don't believe they're relevant.
It can be merged as is.
| use tracing::info; | ||
|
|
||
| /// An SDK interceptor that captures the `VectorIndexes` extension field from | ||
| /// the raw `DescribeTable` JSON response as a [`serde_json::Value`]. The |
There was a problem hiding this comment.
Fixed in next PR.
| /// ```ignore | ||
| /// client | ||
| /// .create_table() | ||
| /// // ... | ||
| /// .customize() | ||
| /// .interceptor(JsonBodyInjectInterceptor::new([ | ||
| /// ("VectorIndexes", vector_indexes_json), | ||
| /// ])) | ||
| /// .send() | ||
| /// .await?; | ||
| /// ``` |
There was a problem hiding this comment.
Let's not add ignored code in docstrings. Either make it work or remove
There was a problem hiding this comment.
I think illustrative example is justified here.
| async fn wait_for_index(clients: &[HttpClient], index: &IndexInfo) { | ||
| for client in clients { | ||
| common::wait_for_index(client, index).await; | ||
| } | ||
| } | ||
|
|
||
| async fn wait_for_no_index(clients: &[HttpClient], index: &IndexInfo) { | ||
| for client in clients { | ||
| common::wait_for_no_index(client, index).await; | ||
| } | ||
| } |
There was a problem hiding this comment.
This could be in common.rs as well
There was a problem hiding this comment.
Could be, but under different name.
Or refactor all tests to wait for all clients they have (unless we want explicitly a subarray). Waiting for single client is potentially flaky.
Introduce the Alternator integration test suite with shared infrastructure (TableShape, Naming patterns, Injectors for customized AWS SDK calls) and test for basic table and index lifecycle operations: CreateTable, DescribeTable, DeleteTable.