Skip to content

Commit ef0f671

Browse files
Fixing e2d and unit tests
1 parent c8587f2 commit ef0f671

22 files changed

+2903
-770
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
with:
2121
toolchain: 1.69
2222
override: true
23+
- name: Updating submodules
24+
run: git submodule update --init --recursive
2325
- name: Update Rust environment
2426
run: rustup component add rust-src --toolchain 1.69-x86_64-unknown-linux-gnu
2527
- name: Adding WebAssembly target

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ docker build -f docker/Dockerfile.testing --progress=plain .
5959
```
6060

6161
## E2E tests
62+
Currently, we have four major tests for testing different endings of the dispute:
63+
* No majority of votes.
64+
* Verdict against the owner of the dispute.
65+
* Verdict against the defendant of the dispute.
66+
* Testing dispute rounds.
67+
6268
To run E2E tests on your local machine, first run a aleph-node, build and deploy smart contract. We can do it, by running `deploy.sh` script:
6369
```
6470
bash scripts/deploy.sh
@@ -72,13 +78,13 @@ ink-wrapper -m ../contract/target/ink/bright_disputes.json --wasm-path ../contra
7278

7379
Finally we can run a e2e tests by calling:
7480
```
75-
cargo +nightly test --release
81+
cargo +nightly-2023-04-19 test --release
7682
```
7783

78-
# TODO:
79-
* Store priv keys for jurors and judge in the JSON file and print it on the cmd
80-
* Judge should issue a verdict and point the banned juries...
81-
* Run/Fix all unit test
82-
* Run/Fix all e2e test
83-
* Update documentation + show cases
84-
84+
The output of the e2e test is:
85+
```
86+
test bright_disputes_test::test_dispute_verdict_none ... ok
87+
test bright_disputes_test::test_dispute_verdict_positive ... ok
88+
test bright_disputes_test::test_dispute_verdict_negative ... ok
89+
test bright_disputes_test::test_dispute_rounds ... ok
90+
```

cli/Cargo.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ edition = "2021"
66
license = "MIT"
77
publish = false
88

9-
[lib]
10-
name = "bright_disputes"
11-
path = "src/lib.rs"
12-
139
[dependencies]
1410
anyhow = "1.0"
1511
inquire = "0.6.2"
@@ -22,6 +18,7 @@ tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros"] }
2218
tracing = "0.1.37"
2319
tracing-subscriber = { version = "0.3.16", features = ["fmt", "json", "env-filter"] }
2420

21+
bright-disputes-lib = { path="lib" }
2522
ark-std = { version = "^0.3.0", default-features = false }
2623
ark-ed-on-bls12-381 = { version = "^0.3.0", features = ["r1cs"] }
2724
ark-serialize = { version = "^0.3.0", default-features = false }

0 commit comments

Comments
 (0)