Skip to content

Commit 43cfc17

Browse files
authored
Easier testability via testcontainers (#499)
* factor out s3 client into own crate * add alternate testability by using testcontainers * comment out services in ci to test * use ip * unused deps * debug * update * logtracer * Enable API in actions * remove tracing for tests * fix local runs * rm host auth * remove empty execstart * unset variables * use nextest * alphabetically sort * up * yarn up * flake.lock: Update Flake lock file updates: • Updated input 'devenv': 'github:cachix/devenv/4eccee9a19ad9be42a7859211b456b281d704313' (2024-03-05) → 'github:cachix/devenv/6c0bad0045f1e1802f769f7890f6a59504825f4d' (2024-03-11) • Updated input 'flake-utils': 'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28) → 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/b8697e57f10292a6165a20f03d2f42920dfaf973' (2024-03-03) → 'github:nixos/nixpkgs/d691274a972b3165335d261cc4671335f5c67de9' (2024-03-14) • Updated input 'rust-overlay': 'github:oxalica/rust-overlay/e86c0fb5d3a22a5f30d7f64ecad88643fe26449d' (2024-03-05) → 'github:oxalica/rust-overlay/7ff8e9a04ac7777a3446788cb4018b452157ab8a' (2024-03-15) * remove commented out lines * add minio test harness * add s3 test * add serial_test annotation * error out on no success * better error message * add body * change bucket name * abstract into shared function * use quick-xml to encode * multipart? * fix typo * set content-length * simplify line * set content length * aggregate etags * use stream utils instead of external counter * send abort request on error * rename future * add from impl
1 parent 9121549 commit 43cfc17

File tree

54 files changed

+1287
-929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1287
-929
lines changed

.github/workflows/rust.yml

+3-27
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
env:
1212
CARGO_TERM_COLOR: always
13+
RUST_LOG: "debug"
1314
RUSTFLAGS: "-C debuginfo=0"
1415

1516
jobs:
@@ -37,36 +38,11 @@ jobs:
3738
test:
3839
name: Test
3940
runs-on: ubuntu-latest
40-
services:
41-
postgres:
42-
image: postgres
43-
ports:
44-
- 5432:5432
45-
env:
46-
POSTGRES_USER: postgres
47-
POSTGRES_PASSWORD: postgres
48-
POSTGRES_DB: test_db
49-
options: >-
50-
--health-cmd pg_isready
51-
--health-interval 10s
52-
--health-timeout 5s
53-
--health-retries 5
54-
redis:
55-
image: redis
56-
ports:
57-
- 6379:6379
58-
options: >-
59-
--health-cmd "redis-cli ping"
60-
--health-interval 10s
61-
--health-timeout 5s
62-
--health-retries 5
6341
steps:
6442
- uses: actions/checkout@v4
6543
- uses: DeterminateSystems/nix-installer-action@v4
6644
- uses: DeterminateSystems/magic-nix-cache-action@main
6745
- uses: Swatinem/rust-cache@v2
6846
- uses: rui314/setup-mold@v1
69-
- run: nix develop --impure --command bash -c "unset LD_LIBRARY_PATH && cargo test --all-features -- --show-output"
70-
env:
71-
DATABASE_URL: "postgres://postgres:postgres@localhost/test_db"
72-
REDIS_URL: "redis://localhost"
47+
- uses: taiki-e/install-action@nextest
48+
- run: nix develop --impure --command bash -c "unset DATABASE_URL LD_LIBRARY_PATH REDIS_URL && cargo nextest run --all-features"

0 commit comments

Comments
 (0)