This commit is contained in:
Andras Schmelczer 2025-03-16 10:32:43 +00:00
parent 3649f335fe
commit 031628cff9
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
4 changed files with 42 additions and 46 deletions

View file

@ -59,12 +59,3 @@ jobs:
run: |
cd frontend
npm run test
- name: E2E tests
run: |
cd ../backend
UST_BACKTRACE=1 cargo run -p sync_server &
cd -
npm run build
test-client/run.sh 32

39
.github/workflows/e2e.yml vendored Normal file
View file

@ -0,0 +1,39 @@
name: E2E tests
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Setup
run: |
cargo install sqlx-cli
cd backend
sqlx database create --database-url sqlite://db.sqlite3
sqlx migrate run --source sync_server/src/database/migrations --database-url sqlite://db.sqlite3
- name: Build wasm
run: |
cd backend
cargo install wasm-pack
wasm-pack build --target web sync_lib
- name: E2E tests
run: |
UST_BACKTRACE=1 cargo run -p sync_server &
cd ../frontend
npm run build
test-client/run.sh 32

35
backend/Cargo.lock generated
View file

@ -105,12 +105,6 @@ dependencies = [
"backtrace",
]
[[package]]
name = "arbitrary"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
[[package]]
name = "async-trait"
version = "0.1.85"
@ -381,8 +375,6 @@ version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc"
dependencies = [
"jobserver",
"libc",
"shlex",
]
@ -1228,15 +1220,6 @@ version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
[[package]]
name = "jobserver"
version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
dependencies = [
"libc",
]
[[package]]
name = "js-sys"
version = "0.3.76"
@ -1290,16 +1273,6 @@ version = "0.2.167"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc"
[[package]]
name = "libfuzzer-sys"
version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b9569d2f74e257076d8c6bfa73fb505b46b851e51ddaecc825944aa3bed17fa"
dependencies = [
"arbitrary",
"cc",
]
[[package]]
name = "libm"
version = "0.2.11"
@ -1781,14 +1754,6 @@ dependencies = [
"test-case",
]
[[package]]
name = "reconcile-fuzz"
version = "0.0.30"
dependencies = [
"libfuzzer-sys",
"reconcile",
]
[[package]]
name = "redox_syscall"
version = "0.5.7"

View file

@ -25,8 +25,9 @@ fn test_base64_to_bytes_error() {
#[wasm_bindgen_test(unsupported = test)]
fn merge_text() {
let left = b"hello ";
let right = b"world";
assert_eq!(merge(b"", left, right), b"hello world".to_vec());
let right = b"world ";
let result = merge(b"", left, right);
assert!(result == b"hello world ".to_vec() || result == b"world hello ".to_vec());
}
#[wasm_bindgen_test(unsupported = test)]