mirror of
https://github.com/azaion/missions.git
synced 2026-06-22 05:01:08 +00:00
chore: update configuration and Docker setup for JWT and test results
ci/woodpecker/push/build-arm Pipeline was successful
ci/woodpecker/push/build-arm Pipeline was successful
Enhanced the .gitignore to exclude test results and updated the Dockerfile to include a new entrypoint script for improved container initialization. Refactored JWT configuration to support additional parameters for automatic refresh intervals, ensuring better control over token management. Updated the ConfigurationResolver to enforce required environment variables without hardcoded fallbacks, enhancing security and flexibility.
This commit is contained in:
@@ -75,14 +75,14 @@
|
||||
|
||||
---
|
||||
|
||||
### FT-P-04: Vehicle list returns plain JSON array (no pagination)
|
||||
### FT-P-04: Vehicle list returns plain JSON array (no pagination), ordered by Name ASC
|
||||
|
||||
**Summary**: Verifies `GET /vehicles` returns a non-paginated array — distinguishing it from `GET /missions`.
|
||||
**Summary**: Verifies `GET /vehicles` returns a non-paginated array — distinguishing it from `GET /missions` — and that results are ordered alphabetically by `Name` ASC (per AircraftService.GetVehicles `OrderBy(a => a.Name)`).
|
||||
**Traces to**: AC-1.5
|
||||
**Category**: Vehicle CRUD
|
||||
|
||||
**Preconditions**:
|
||||
- `seed_3_vehicles_2_default`
|
||||
- `seed_3_vehicles_2_default` containing `BR-01`, `BR-02`, `MQ-9` (any insert order)
|
||||
|
||||
**Input data**: `GET /vehicles`
|
||||
|
||||
@@ -90,16 +90,16 @@
|
||||
|
||||
| Step | Consumer Action | Expected System Response |
|
||||
|------|----------------|------------------------|
|
||||
| 1 | `GET /vehicles` | `200`; body parses as JSON array (NOT object); `body.length == 3`; each element has PascalCase keys per FT-P-01 |
|
||||
| 1 | `GET /vehicles` | `200`; body parses as JSON array (NOT object); `body.length == 3`; each element has PascalCase keys per FT-P-01; `[v.Name for v in body] == ["BR-01", "BR-02", "MQ-9"]` (alphabetical ASC) |
|
||||
|
||||
**Expected outcome**: results_report.md AC-1 row 1.5.
|
||||
**Max execution time**: 2s.
|
||||
|
||||
---
|
||||
|
||||
### FT-P-05: Vehicle filter by name + isDefault
|
||||
### FT-P-05: Vehicle filter by name + isDefault (case-INSENSITIVE name)
|
||||
|
||||
**Summary**: Verifies query-string filter (case-sensitive substring on `name`, exact on `isDefault`).
|
||||
**Summary**: Verifies query-string filter — **case-INSENSITIVE** substring on `name` (LinqToDB renders `LOWER(name) LIKE %lower(input)%`), exact on `isDefault`.
|
||||
**Traces to**: AC-1.6
|
||||
**Category**: Vehicle CRUD
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
| Step | Consumer Action | Expected System Response |
|
||||
|------|----------------|------------------------|
|
||||
| 1 | `GET /vehicles?name=BR&isDefault=true` | `200`; `body.length == 1`; `body[0].Name == "BR-01"` |
|
||||
| 2 | `GET /vehicles?name=br&isDefault=true` (lowercase) | `200`; `body.length == 1`; `body[0].Name == "BR-01"` (case-INSENSITIVE match) |
|
||||
|
||||
**Expected outcome**: results_report.md AC-1 row 1.6.
|
||||
**Max execution time**: 2s.
|
||||
@@ -165,14 +166,14 @@
|
||||
|
||||
---
|
||||
|
||||
### FT-P-08: Mission list paginated default page
|
||||
### FT-P-08: Mission list paginated default page, ordered by CreatedDate DESC
|
||||
|
||||
**Summary**: Verifies `GET /missions` returns `PaginatedResponse<Mission>` with default page size 20.
|
||||
**Summary**: Verifies `GET /missions` returns `PaginatedResponse<Mission>` with default page size 20, ordered by `CreatedDate` DESC (newest first per `FlightService.GetMissions` `OrderByDescending(f => f.CreatedDate)`).
|
||||
**Traces to**: AC-2.3, AC-8.7
|
||||
**Category**: Mission CRUD
|
||||
|
||||
**Preconditions**:
|
||||
- `seed_25_missions`
|
||||
- `seed_25_missions` with deterministic `CreatedDate` values spanning January-February 2026
|
||||
|
||||
**Input data**: `GET /missions`
|
||||
|
||||
@@ -180,7 +181,8 @@
|
||||
|
||||
| Step | Consumer Action | Expected System Response |
|
||||
|------|----------------|------------------------|
|
||||
| 1 | `GET /missions` | `200`; body parses as object with PascalCase keys `Items, TotalCount, Page, PageSize`; `Page==1`; `PageSize==20`; `TotalCount==25`; `Items.length==20` |
|
||||
| 1 | `GET /missions` | `200`; body parses as object with PascalCase keys `Items, TotalCount, Page, PageSize`; `Page==1`; `PageSize==20`; `TotalCount==25`; `Items.length==20`; for every `i` in `[0..18]`: `Items[i].CreatedDate >= Items[i+1].CreatedDate` (DESC ordering) |
|
||||
| 2 | `GET /missions?name=re` (lowercase) against missions containing `"Recon-*"` names | `200`; `body.TotalCount > 0` — case-INSENSITIVE name filter matches Mission Name `"Recon-*"` |
|
||||
|
||||
**Expected outcome**: results_report.md AC-2 row 2.3.
|
||||
**Max execution time**: 2s.
|
||||
@@ -421,24 +423,26 @@
|
||||
|
||||
## Negative Scenarios
|
||||
|
||||
### FT-N-01: Vehicle name filter is case-sensitive
|
||||
### FT-N-01: Vehicle name filter returns empty when no row matches case-insensitively
|
||||
|
||||
**Summary**: Verifies `name=br` does NOT match `BR-01` (case sensitivity).
|
||||
**Summary**: Verifies that `?name=` returns an empty body when no row's `Name` contains the substring (case-insensitive). This is the "no-match" half of AC-1.6 — distinct from FT-P-05 which asserts that lowercase input DOES match `BR-01`.
|
||||
**Traces to**: AC-1.6
|
||||
**Category**: Vehicle CRUD (negative)
|
||||
|
||||
**Preconditions**:
|
||||
- `seed_3_vehicles_2_default` (only contains `BR-*` names — no `br-*`)
|
||||
- `seed_3_vehicles_2_default` (`BR-01`, `BR-02`, `MQ-9`)
|
||||
|
||||
**Input data**: `GET /vehicles?name=br`
|
||||
**Input data**: `GET /vehicles?name=ZZ` (substring `ZZ` is absent from every name)
|
||||
|
||||
**Steps**:
|
||||
|
||||
| Step | Consumer Action | Expected System Response |
|
||||
|------|----------------|------------------------|
|
||||
| 1 | request as above | `200`; `body.length == 0` |
|
||||
| 1 | `GET /vehicles?name=ZZ` | `200`; `body.length == 0` |
|
||||
| 2 | `GET /vehicles?name=zz` (lowercase) | `200`; `body.length == 0` (still no match) |
|
||||
|
||||
**Expected outcome**: results_report.md AC-1 row 1.7.
|
||||
**Note (drift, 2026-05-14)**: this test was previously titled "Vehicle name filter is case-sensitive" and asserted `?name=br → length 0`. That assertion was WRONG against the actual code (`a.Name.ToLower().Contains(query.Name.ToLower())` — case-insensitive). The test is rewritten to assert the genuine no-match case.
|
||||
**Max execution time**: 2s.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user