Skip to content

Commit

Permalink
Fix #256 and #280
Browse files Browse the repository at this point in the history
  • Loading branch information
c410-f3r committed Dec 26, 2024
1 parent a3c91b9 commit 0ce6fe1
Show file tree
Hide file tree
Showing 120 changed files with 5,015 additions and 2,113 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ jobs:

integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
scripts: [
"integration-tests",
"integration-tests-mysql",
]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand All @@ -81,8 +87,7 @@ jobs:
- run: sudo apt install docker-compose -y
- run: docker-compose -f .test-utils/docker-compose.yml up -d
- run: sleep 30
- run: .scripts/integration-tests.sh

- run: .scripts/${{ matrix.scripts }}.sh

internal-tests-0:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
**/rustc-ice-*.txt
**/target
boringssl
callgrind*
mdbook-target
wtx-docs/book
wtx-fuzz/artifacts
Expand Down
9 changes: 9 additions & 0 deletions .scripts/boringssl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set -euxo pipefail

if [ ! -d "./boringssl" ]; then
git clone --depth 1 --branch 0.20241209.0 https://github.com/google/boringssl
fi

cargo build --bin boringssl --features tls
cd boringssl/ssl/test/runner
go test -shim-path "target/ssl/test/bssl_shim" -num-workers 1
2 changes: 1 addition & 1 deletion .scripts/h2load.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ cargo build --bin h2load --features="wtx/http2,wtx/nightly" --profile deploy
cargo run --bin h2load --features="wtx/http2,wtx/nightly" --profile deploy &
sleep 1

h2load -c100 -m10 -n100000 --no-tls-proto=h2c http://localhost:9000
h2load -c100 --log-file=/tmp/h2load.txt -m10 -n100000 --no-tls-proto=h2c http://localhost:9000
9 changes: 9 additions & 0 deletions .scripts/integration-tests-mysql.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

export DATABASE_URI_MYSQL='mysql://wtx:wtx@localhost:3307/wtx'

cargo test --features mysql,_integration-tests --release -- --test-threads=1

export DATABASE_URI_MYSQL='mysql://wtx:wtx@localhost:3308/wtx'

cargo test --features mysql,_integration-tests --release -- --test-threads=1
3 changes: 2 additions & 1 deletion .scripts/integration-tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

export DATABASE_URI='postgres://wtx_scram:wtx@localhost:5432/wtx'
export DATABASE_URI_MYSQL='mysql://wtx:wtx@localhost:3306/wtx'
export DATABASE_URI_POSTGRESQL='postgres://wtx_scram:wtx@localhost:5432/wtx'

cargo test --all-features --release -- --test-threads=1

Expand Down
1 change: 0 additions & 1 deletion .scripts/internal-tests-0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ $rt test-with-features wtx sha2
$rt test-with-features wtx simdutf8
$rt test-with-features wtx std
$rt test-with-features wtx tokio
$rt test-with-features wtx tokio-rustls
$rt test-with-features wtx tracing
$rt test-with-features wtx uuid
$rt test-with-features wtx web-socket
Expand Down
1 change: 1 addition & 0 deletions .scripts/podman-rm.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
podman container rm -fi wtx_mysql
podman container rm -fi wtx_postgres_scram
11 changes: 11 additions & 0 deletions .scripts/podman-start.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
podman run \
-d \
--name wtx_mysql \
-e MYSQL_DATABASE=wtx \
-e MYSQL_PASSWORD=wtx \
-e MYSQL_ROOT_HOST='%' \
-e MYSQL_ROOT_PASSWORD=wtx \
-e MYSQL_USER=wtx \
-p 3306:3306 \
docker.io/library/mysql:9

podman run \
-d \
--name wtx_postgres_scram \
Expand Down
37 changes: 36 additions & 1 deletion .test-utils/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
version: "3"

services:
# MySQL

mariadb_11:
environment:
MYSQL_DATABASE: wtx
MYSQL_PASSWORD: wtx
MYSQL_ROOT_PASSWORD: wtx
MYSQL_USER: wtx
image: mariadb:11
ports:
- 3306:3306

mysql_9:
environment:
MYSQL_DATABASE: wtx
MYSQL_PASSWORD: wtx
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: wtx
MYSQL_USER: wtx
image: mysql:9
ports:
- 3307:3306

percona_9:
environment:
MYSQL_DATABASE: wtx
MYSQL_PASSWORD: wtx
MYSQL_ROOT_PASSWORD: wtx
MYSQL_USER: wtx
image: percona:8
ports:
- 3308:3306

# PostgreSQL

postgres_scram:
environment:
POSTGRES_DB: wtx
Expand All @@ -9,4 +44,4 @@ services:
ports:
- 5432:5432
volumes:
- ./../.test-utils/postgres.sh:/docker-entrypoint-initdb.d/setup.sh
- ./../.test-utils/postgres.sh:/docker-entrypoint-initdb.d/setup.sh
Loading

0 comments on commit 0ce6fe1

Please sign in to comment.