Skip to content

Commit 57d7635

Browse files
committed
chore: remove toilet paper on shoe
Claude chattily records the minutiae of transforming text from one file to another. That's not helpful to future maintainers, and will confuse newcomers to the code base.
1 parent 95ce76e commit 57d7635

File tree

5 files changed

+3
-27
lines changed

5 files changed

+3
-27
lines changed

tests/sqlx/tests/aggregate_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ async fn group_by_with_encrypted_column(pool: PgPool) -> Result<()> {
8888
}
8989

9090
// ========== eql_v2.min() and eql_v2.max() Tests ==========
91-
// Source: src/encrypted/aggregates_test.sql
9291

9392
#[sqlx::test(fixtures(path = "../fixtures", scripts("aggregate_minmax_data")))]
9493
async fn eql_v2_min_with_null_values(pool: PgPool) -> Result<()> {

tests/sqlx/tests/comparison_tests.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ async fn greater_than_or_equal_jsonb_gte_encrypted(pool: PgPool) -> Result<()> {
321321
#[sqlx::test]
322322
async fn selector_less_than_with_ore_cllw_u64_8(pool: PgPool) -> Result<()> {
323323
// Test: e->'selector' < term with ore_cllw_u64_8 index
324-
// Source SQL: src/operators/<_test.sql (lines 20-50)
325324
//
326325
// Uses test data created by seed_encrypted_json() helper which creates:
327326
// - Three records with n=10, n=20, n=30
@@ -355,7 +354,6 @@ async fn selector_less_than_with_ore_cllw_u64_8(pool: PgPool) -> Result<()> {
355354
#[sqlx::test]
356355
async fn selector_less_than_with_ore_cllw_u64_8_fallback(pool: PgPool) -> Result<()> {
357356
// Test: e->'selector' < term fallback when index missing
358-
// Source SQL: src/operators/<_test.sql (lines 42-48)
359357
//
360358
// Tests that comparison falls back to JSONB literal comparison
361359
// when the requested index type is not present on the selector
@@ -387,7 +385,6 @@ async fn selector_less_than_with_ore_cllw_u64_8_fallback(pool: PgPool) -> Result
387385
#[sqlx::test]
388386
async fn selector_less_than_with_ore_cllw_var_8(pool: PgPool) -> Result<()> {
389387
// Test: e->'selector' < term with ore_cllw_var_8 index
390-
// Source SQL: src/operators/<_test.sql (lines 66-95)
391388
//
392389
// STE vec test data has ore_cllw_var_8 on $.hello selector (a7cea93975ed8c01f861ccb6bd082784)
393390
// Extract $.hello from ste_vec id=3 and compare
@@ -419,7 +416,6 @@ async fn selector_less_than_with_ore_cllw_var_8(pool: PgPool) -> Result<()> {
419416
#[sqlx::test]
420417
async fn selector_greater_than_with_ore_cllw_u64_8(pool: PgPool) -> Result<()> {
421418
// Test: e->'selector' > term with ore_cllw_u64_8 index
422-
// Source SQL: src/operators/>_test.sql (lines 20-50)
423419
//
424420
// Extract $.n from ste_vec id=2 (n=20 value) and find records > 20
425421

@@ -450,7 +446,6 @@ async fn selector_greater_than_with_ore_cllw_u64_8(pool: PgPool) -> Result<()> {
450446
#[sqlx::test]
451447
async fn selector_greater_than_with_ore_cllw_u64_8_fallback(pool: PgPool) -> Result<()> {
452448
// Test: e->'selector' > term fallback when index missing
453-
// Source SQL: src/operators/>_test.sql (lines 42-48)
454449

455450
sqlx::query("SELECT create_table_with_encrypted()")
456451
.execute(&pool)
@@ -478,7 +473,6 @@ async fn selector_greater_than_with_ore_cllw_u64_8_fallback(pool: PgPool) -> Res
478473
#[sqlx::test]
479474
async fn selector_greater_than_with_ore_cllw_var_8(pool: PgPool) -> Result<()> {
480475
// Test: e->'selector' > term with ore_cllw_var_8 index
481-
// Source SQL: src/operators/>_test.sql (lines 66-96)
482476

483477
sqlx::query("SELECT create_table_with_encrypted()")
484478
.execute(&pool)
@@ -507,7 +501,6 @@ async fn selector_greater_than_with_ore_cllw_var_8(pool: PgPool) -> Result<()> {
507501
#[sqlx::test]
508502
async fn selector_greater_than_with_ore_cllw_var_8_fallback(pool: PgPool) -> Result<()> {
509503
// Test: e->'selector' > term fallback to JSONB comparison
510-
// Source SQL: src/operators/>_test.sql (lines 88-94)
511504
//
512505
// Tests fallback when selector doesn't have ore_cllw_var_8
513506

@@ -540,7 +533,6 @@ async fn selector_greater_than_with_ore_cllw_var_8_fallback(pool: PgPool) -> Res
540533
#[sqlx::test]
541534
async fn selector_less_than_or_equal_with_ore_cllw_u64_8(pool: PgPool) -> Result<()> {
542535
// Test: e->'selector' <= term with ore_cllw_u64_8 index
543-
// Source SQL: src/operators/<=_ore_cllw_u64_8_test.sql (lines 23-53)
544536
//
545537
// Extract $.n from ste_vec id=2 (n=20) and find records <= 20
546538

@@ -571,7 +563,6 @@ async fn selector_less_than_or_equal_with_ore_cllw_u64_8(pool: PgPool) -> Result
571563
#[sqlx::test]
572564
async fn selector_less_than_or_equal_with_ore_cllw_u64_8_fallback(pool: PgPool) -> Result<()> {
573565
// Test: e->'selector' <= term fallback when index missing
574-
// Source SQL: src/operators/<=_ore_cllw_u64_8_test.sql (lines 45-51)
575566

576567
sqlx::query("SELECT create_table_with_encrypted()")
577568
.execute(&pool)
@@ -601,7 +592,6 @@ async fn selector_less_than_or_equal_with_ore_cllw_u64_8_fallback(pool: PgPool)
601592
#[sqlx::test]
602593
async fn selector_greater_than_or_equal_with_ore_cllw_u64_8(pool: PgPool) -> Result<()> {
603594
// Test: e->'selector' >= term with ore_cllw_u64_8 index
604-
// Source SQL: src/operators/>=_test.sql (lines 20-50)
605595
//
606596
// Extract $.n from ste_vec id=1 (n=10) and find records >= 10
607597

@@ -632,7 +622,6 @@ async fn selector_greater_than_or_equal_with_ore_cllw_u64_8(pool: PgPool) -> Res
632622
#[sqlx::test]
633623
async fn selector_greater_than_or_equal_with_ore_cllw_u64_8_fallback(pool: PgPool) -> Result<()> {
634624
// Test: e->'selector' >= term fallback when index missing
635-
// Source SQL: src/operators/>=_test.sql (lines 42-48)
636625

637626
sqlx::query("SELECT create_table_with_encrypted()")
638627
.execute(&pool)
@@ -660,7 +649,6 @@ async fn selector_greater_than_or_equal_with_ore_cllw_u64_8_fallback(pool: PgPoo
660649
#[sqlx::test]
661650
async fn selector_greater_than_or_equal_with_ore_cllw_var_8(pool: PgPool) -> Result<()> {
662651
// Test: e->'selector' >= term with ore_cllw_var_8 index
663-
// Source SQL: src/operators/>=_test.sql (lines 66-96)
664652

665653
sqlx::query("SELECT create_table_with_encrypted()")
666654
.execute(&pool)
@@ -689,7 +677,6 @@ async fn selector_greater_than_or_equal_with_ore_cllw_var_8(pool: PgPool) -> Res
689677
#[sqlx::test]
690678
async fn selector_greater_than_or_equal_with_ore_cllw_var_8_fallback(pool: PgPool) -> Result<()> {
691679
// Test: e->'selector' >= term fallback to JSONB comparison
692-
// Source SQL: src/operators/>=_test.sql (lines 88-94)
693680

694681
sqlx::query("SELECT create_table_with_encrypted()")
695682
.execute(&pool)

tests/sqlx/tests/constraint_tests.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,12 @@ async fn foreign_key_constraint_with_encrypted(pool: PgPool) -> Result<()> {
223223
}
224224

225225
// ========================================================================
226-
// EQL-Specific Constraint Tests (from src/encrypted/constraints_test.sql)
226+
// EQL-Specific Constraint Tests
227227
// ========================================================================
228228

229229
#[sqlx::test(fixtures(path = "../fixtures", scripts("encrypted_json")))]
230230
async fn add_encrypted_constraint_prevents_invalid_data(pool: PgPool) -> Result<()> {
231231
// Test: eql_v2.add_encrypted_constraint() adds validation to encrypted column
232-
// Source: constraints_test.sql lines 3-21
233232

234233
// First, verify that insert without constraint works (even with invalid empty JSONB)
235234
sqlx::query("INSERT INTO encrypted (e) VALUES ('{}'::jsonb::eql_v2_encrypted)")
@@ -281,7 +280,6 @@ async fn add_encrypted_constraint_prevents_invalid_data(pool: PgPool) -> Result<
281280
#[sqlx::test(fixtures(path = "../fixtures", scripts("encrypted_json")))]
282281
async fn remove_encrypted_constraint_allows_invalid_data(pool: PgPool) -> Result<()> {
283282
// Test: eql_v2.remove_encrypted_constraint() removes validation from encrypted column
284-
// Source: constraints_test.sql lines 24-43
285283

286284
// Add the encrypted constraint first
287285
sqlx::query("SELECT eql_v2.add_encrypted_constraint('encrypted', 'e')")
@@ -323,7 +321,6 @@ async fn remove_encrypted_constraint_allows_invalid_data(pool: PgPool) -> Result
323321
#[sqlx::test(fixtures(path = "../fixtures", scripts("encrypted_json")))]
324322
async fn version_metadata_validation_on_insert(pool: PgPool) -> Result<()> {
325323
// Test: EQL version metadata (v field) is enforced on insert
326-
// Source: constraints_test.sql lines 106-138
327324
//
328325
// Note: The SQL test doesn't explicitly add a constraint, which suggests
329326
// version validation is built into the eql_v2_encrypted type itself or

tests/sqlx/tests/jsonb_path_operators_tests.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ async fn arrow_operator_returns_metadata_fields(pool: PgPool) -> Result<()> {
100100
// Test: e -> 'selector' returns JSONB with 'i' (index) and 'v' (version) metadata fields.
101101
// This verifies that the arrow operator returns the full encrypted metadata structure,
102102
// not just the value. The metadata includes the index term ('i') and version ('v').
103-
// SQL equivalent: src/operators/->_test.sql lines 106-118
104103
//
105104
// NOTE: This test uses raw SQLx instead of QueryAssertion because we need to verify
106105
// specific JSONB field presence. QueryAssertion is designed for row count and basic
@@ -132,7 +131,6 @@ async fn arrow_operator_returns_metadata_fields(pool: PgPool) -> Result<()> {
132131
#[sqlx::test(fixtures(path = "../fixtures", scripts("encrypted_json")))]
133132
async fn ciphertext_function_extracts_from_arrow_result(pool: PgPool) -> Result<()> {
134133
// Test: eql_v2.ciphertext(e -> 'selector') extracts ciphertext value
135-
// SQL equivalent: src/operators/->_test.sql lines 60-75
136134
//
137135
// The ciphertext() function extracts the 'c' field from the encrypted JSONB structure.
138136
// When combined with the -> operator, it allows extracting ciphertext from nested paths.
@@ -151,7 +149,6 @@ async fn ciphertext_function_extracts_from_arrow_result(pool: PgPool) -> Result<
151149
#[sqlx::test(fixtures(path = "../fixtures", scripts("encrypted_json")))]
152150
async fn ciphertext_function_returns_all_rows(pool: PgPool) -> Result<()> {
153151
// Test: eql_v2.ciphertext() returns ciphertext for all encrypted rows
154-
// SQL equivalent: src/operators/->_test.sql lines 70-73
155152

156153
let sql = format!(
157154
"SELECT eql_v2.ciphertext(e -> '{}'::text) FROM encrypted",
@@ -167,7 +164,6 @@ async fn ciphertext_function_returns_all_rows(pool: PgPool) -> Result<()> {
167164
#[sqlx::test(fixtures(path = "../fixtures", scripts("encrypted_json")))]
168165
async fn arrow_operator_with_encrypted_selector(pool: PgPool) -> Result<()> {
169166
// Test: e -> eql_v2_encrypted selector (encrypted selector)
170-
// SQL equivalent: src/operators/->_test.sql lines 39-56
171167
//
172168
// The -> operator can accept an eql_v2_encrypted value as the selector.
173169
// The selector is created from JSONB with structure: {"s": "selector_hash"}
@@ -186,7 +182,6 @@ async fn arrow_operator_with_encrypted_selector(pool: PgPool) -> Result<()> {
186182
#[sqlx::test(fixtures(path = "../fixtures", scripts("encrypted_json")))]
187183
async fn arrow_operator_with_encrypted_selector_all_rows(pool: PgPool) -> Result<()> {
188184
// Test: e -> eql_v2_encrypted selector returns all matching rows
189-
// SQL equivalent: src/operators/->_test.sql lines 51-54
190185

191186
let encrypted_selector = Selectors::as_encrypted(Selectors::ROOT);
192187
let sql = format!(
@@ -203,7 +198,6 @@ async fn arrow_operator_with_encrypted_selector_all_rows(pool: PgPool) -> Result
203198
#[sqlx::test(fixtures(path = "../fixtures", scripts("encrypted_json")))]
204199
async fn double_arrow_operator_with_encrypted_selector(pool: PgPool) -> Result<()> {
205200
// Test: e ->> eql_v2_encrypted selector (encrypted selector)
206-
// SQL equivalent: src/operators/->>_test.sql lines 50-67
207201
//
208202
// The ->> operator can also accept an eql_v2_encrypted value as the selector.
209203

@@ -221,7 +215,6 @@ async fn double_arrow_operator_with_encrypted_selector(pool: PgPool) -> Result<(
221215
#[sqlx::test(fixtures(path = "../fixtures", scripts("encrypted_json")))]
222216
async fn double_arrow_operator_with_encrypted_selector_all_rows(pool: PgPool) -> Result<()> {
223217
// Test: e ->> eql_v2_encrypted selector returns all matching rows
224-
// SQL equivalent: src/operators/->>_test.sql lines 62-65
225218

226219
let encrypted_selector = Selectors::as_encrypted(Selectors::ROOT);
227220
let sql = format!(

tests/sqlx/tests/order_by_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ async fn order_by_asc_with_greater_than_returns_lowest(pool: PgPool) -> Result<(
119119
Ok(())
120120
}
121121

122-
// NULL ordering tests - replicating SQL test cases from order_by_test.sql lines 93-116
122+
// NULL ordering tests
123123

124124
#[sqlx::test]
125125
async fn order_by_asc_nulls_first_returns_null_record_first(pool: PgPool) -> Result<()> {
@@ -329,7 +329,7 @@ async fn order_by_desc_nulls_last_returns_largest_value_first(pool: PgPool) -> R
329329
Ok(())
330330
}
331331

332-
// eql_v2.order_by() helper function tests - from order_by_test.sql lines 133-144
332+
// eql_v2.order_by() helper function tests
333333

334334
#[sqlx::test]
335335
async fn order_by_helper_function_desc_returns_correct_count(pool: PgPool) -> Result<()> {

0 commit comments

Comments
 (0)