MCPcopy Create free account
hub / github.com/ExtendDB/extenddb / scan_empty_table

Function scan_empty_table

tests/rust/src/scan.rs:138–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136
137#[tokio::test]
138async fn scan_empty_table() {
139 let c = client();
140 let table = format!("ScanEmpty_{}", ts());
141 use aws_sdk_dynamodb::types::{
142 AttributeDefinition, BillingMode, KeySchemaElement, KeyType, ScalarAttributeType,
143 };
144 c.create_table()
145 .table_name(&table)
146 .billing_mode(BillingMode::PayPerRequest)
147 .key_schema(
148 KeySchemaElement::builder()
149 .attribute_name(HASH_KEY_S)
150 .key_type(KeyType::Hash)
151 .build()
152 .unwrap(),
153 )
154 .attribute_definitions(
155 AttributeDefinition::builder()
156 .attribute_name(HASH_KEY_S)
157 .attribute_type(ScalarAttributeType::S)
158 .build()
159 .unwrap(),
160 )
161 .send()
162 .await
163 .unwrap();
164 wait_for_active(c, &table).await;
165
166 let resp = c.scan().table_name(&table).send().await.unwrap();
167 assert_eq!(resp.count(), 0);
168 assert!(resp.items().is_empty());
169}
170
171#[tokio::test]
172async fn scan_non_existent_table() {

Callers

nothing calls this directly

Calls 6

clientFunction · 0.85
table_nameMethod · 0.80
create_tableMethod · 0.80
scanMethod · 0.80
wait_for_activeFunction · 0.70
buildMethod · 0.45

Tested by

no test coverage detected