Skip to content

Commit 1b6f460

Browse files
committed
docs: update DEVELOPMENT.md for SQLx-only testing
- Update file structure description to reference tests/sqlx/ - Simplify testing section to focus on SQLx framework - Remove outdated mermaid workflow diagram - Fix formatting of IMPORTANT block
1 parent f034f9a commit 1b6f460

File tree

1 file changed

+5
-71
lines changed

1 file changed

+5
-71
lines changed

DEVELOPMENT.md

Lines changed: 5 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ These are the important files in the repo:
5959
└── playground/ <-- Playground enviroment for experimenting with EQL and CipherStash Proxy
6060
```
6161

62-
Tests live alongside the individual SQL files, with a filename ending with `_test.sql`
62+
Tests are in the `tests/sqlx/` directory using Rust and the SQLx framework.
6363

6464
We break SQL into small modules named after what they do.
6565

@@ -144,85 +144,19 @@ There are tests for checking EQL against PostgreSQL versions 14–17, that verif
144144
- Validating schemas for EQL configuration, encrypted data, and encrypted indexes
145145
- Using PostgreSQL operators on encrypted data and indexes (`=`, `<>`, `@>`)
146146

147+
Tests are written in Rust using the SQLx framework and live in `tests/sqlx/`.
148+
147149
The easiest way to run the tests [is in GitHub Actions](./.github/workflows/test-eql.yml):
148150

149151
- Automatically whenever there are changes in the `sql/`, `tests/`, or `tasks/` directories
150152
- By manually running [the workflow](https://github.com/cipherstash/encrypt-query-language/actions/workflows/test-eql.yml)
151153

152-
This is how the `test-eql.yml` workflow functions:
153-
154-
```mermaid
155-
---
156-
title: Testing EQL
157-
---
158-
stateDiagram-v2
159-
direction LR
160-
classDef code font-family:monospace;
161-
162-
163-
state "🧍 Human makes changes to EQL sources" as changes
164-
state sources_fork <<fork>>
165-
state sources_join <<join>>
166-
state "src/*.sql" as source_sql
167-
state "tasks/**/*" as source_tasks
168-
state "tests/**/*" as source_tests
169-
state sources_changed <<choice>>
170-
171-
state "🛠️ Trigger GitHub Actions workflow test-eql.yml" as build_triggered
172-
state "Matrix: Test EQL SQL components" as matrix
173-
state "Test with Postgres 14" as pg14
174-
state "Test with Postgres 15" as pg15
175-
state "Test with Postgres 16" as pg16
176-
state "Test with Postgres 17" as pg17
177-
state "Check build results" as check
178-
state if_state <<choice>>
179-
180-
changes --> sources_fork
181-
sources_fork --> source_sql:::code
182-
sources_fork --> source_tests:::code
183-
sources_fork --> source_tasks:::code
184-
source_sql --> sources_join
185-
source_tests --> sources_join
186-
source_tasks --> sources_join
187-
sources_join --> source_changed_check
188-
source_changed_check --> sources_changed
189-
sources_changed --> build_triggered : Some changes
190-
sources_changed --> [*]: No changes
191-
192-
state "Check source changes" as source_changed_check
193-
194-
[*] --> changes
195-
196-
build_triggered --> matrix
197-
198-
state fork_state <<fork>>
199-
matrix --> fork_state
200-
fork_state --> pg14
201-
fork_state --> pg15
202-
fork_state --> pg16
203-
fork_state --> pg17
204-
205-
state join_state <<join>>
206-
pg14 --> join_state
207-
pg15 --> join_state
208-
pg16 --> join_state
209-
pg17 --> join_state
210-
211-
state "✅ Pass build" as build_pass
212-
state "❌ Fail build" as build_fail
213-
join_state --> check
214-
check --> if_state
215-
if_state --> build_pass: All success
216-
if_state --> build_fail : Any failures
217-
build_pass --> [*]
218-
build_fail --> [*]
219-
```
220-
221154
You can also [run the tests locally](#running-tests-locally) when doing local development.
222155

223156
### Running tests locally
224157

225-
> [!IMPORTANT] > **Before you run the tests locally** you need to [set up a local dev environment](#set-up-a-local-development-environment).
158+
> [!IMPORTANT]
159+
> **Before you run the tests locally** you need to [set up a local dev environment](#set-up-a-local-development-environment).
226160
227161
To run tests locally with PostgreSQL 17:
228162

0 commit comments

Comments
 (0)