Skip to content

Commit

Permalink
Easier testability via testcontainers (#499)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
aumetra authored Mar 16, 2024
1 parent 9121549 commit 43cfc17
Show file tree
Hide file tree
Showing 54 changed files with 1,287 additions and 929 deletions.
30 changes: 3 additions & 27 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

env:
CARGO_TERM_COLOR: always
RUST_LOG: "debug"
RUSTFLAGS: "-C debuginfo=0"

jobs:
Expand Down Expand Up @@ -37,36 +38,11 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: Swatinem/rust-cache@v2
- uses: rui314/setup-mold@v1
- run: nix develop --impure --command bash -c "unset LD_LIBRARY_PATH && cargo test --all-features -- --show-output"
env:
DATABASE_URL: "postgres://postgres:postgres@localhost/test_db"
REDIS_URL: "redis://localhost"
- uses: taiki-e/install-action@nextest
- run: nix develop --impure --command bash -c "unset DATABASE_URL LD_LIBRARY_PATH REDIS_URL && cargo nextest run --all-features"
Loading

0 comments on commit 43cfc17

Please sign in to comment.