Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix e2e tests #646

Merged
merged 36 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
34621da
Temporarily disable eth bridge e2e tests
sug0 Sep 13, 2022
5840830
Disable eth full node in ledger tests
sug0 Sep 13, 2022
8f9c604
Add abciplus feature flag to e2e tests
sug0 Sep 13, 2022
1fdd1be
Fix e2e test regex matching on fullnodes
sug0 Sep 13, 2022
4950c44
Run make fmt
sug0 Sep 13, 2022
95d71af
Fix regex for valid tx in e2e tests
sug0 Sep 13, 2022
eb798c9
Add a script to unwrap e2e log output
sug0 Sep 13, 2022
7800d90
Describe unwrap e2e tests script
sug0 Sep 13, 2022
56350f1
Revert "Fix regex for valid tx in e2e tests"
sug0 Sep 21, 2022
4babd0b
Partially fix ledger_txs_and_queries() e2e test
sug0 Sep 19, 2022
a8f69be
Merge branch 'tiago/ethbridge/remove-ws-cli' into tiago/ethbridge/fix…
sug0 Sep 30, 2022
c407015
Improve logging of namadac in e2e tests
sug0 Sep 30, 2022
7b04bad
Re-enable ledger_txs_and_queries() e2e test
sug0 Sep 30, 2022
9e4044b
Update Cargo.lock
sug0 Sep 30, 2022
301edab
Remove TODO from ledger_txs_and_queries() e2e test
sug0 Sep 30, 2022
0ccc346
Re-enable and fix run_ledger() e2e test
sug0 Sep 30, 2022
ef4cada
Refactor update config
sug0 Sep 30, 2022
4e1e8bd
Downgraded problematic deps in Cargo.lock
sug0 Sep 30, 2022
c7c9754
More Cargo.lock madness
sug0 Sep 30, 2022
fec843a
Add missing import
sug0 Sep 30, 2022
161293a
Fix most e2e tests
sug0 Sep 30, 2022
d30b908
Merge tiago/ethbridge/remove-ws-cli
sug0 Oct 6, 2022
fa2dc59
Merge branch 'tiago/ethbridge/remove-ws-cli' into tiago/ethbridge/fix…
sug0 Oct 6, 2022
25f6887
Merge tiago/ethbridge/impl-events-endpoint
sug0 Oct 19, 2022
2e685bd
Wait for Tendermint's RPC server to start in e2e tests
sug0 Oct 19, 2022
7dee715
Re-enable eth bridge tests
sug0 Oct 19, 2022
18a8b2b
Export ANOMA_TM_STDOUT env var in e2e tests
sug0 Oct 19, 2022
4729acc
Disable outdated e2e test
sug0 Oct 19, 2022
7782750
Move e2e test utils to setup.rs
sug0 Oct 19, 2022
a3517df
Merge branch 'tiago/ethbridge/fix-wasms-build' into tiago/ethbridge/f…
sug0 Oct 20, 2022
d4f444d
Merge branch 'tiago/ethbridge/fix-valset-upd-verification' into tiago…
sug0 Oct 20, 2022
d4778c0
scripts: Update unwrap_e2e_log.py
sug0 Oct 20, 2022
3d45649
Remove extra space
sug0 Oct 20, 2022
f181a57
Check if a tx is applied on chain
sug0 Oct 20, 2022
1821861
Merge remote-tracking branch 'origin/eth-bridge-integration' into tia…
sug0 Oct 21, 2022
839793f
Release lock on wallet in e2e tests
sug0 Oct 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions scripts/unwrap_e2e_log.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env python3

# this script takes `expectrl` log outputs, such as the ones emitted by
# e2e tests, and unwraps them into a more readable format

import re
import sys

UNICODE = re.compile(r'\\u{([\da-fA-F]+)}')

def main():
if len(sys.argv) > 1:
with open(sys.argv[1], 'r') as f:
process_file(f)
else:
process_file(sys.stdin)

def process_file(f):
for line in f.readlines():
process_line(line)
sys.stdout.flush()

def process_line(line):
for m in UNICODE.findall(line):
line = line.replace(f'\\u{{{m}}}', f'\\u{int(m, 16):04x}')
line = \
try_parse_line_str(line) or \
try_parse_line_bytes(line) or \
''
sys.stdout.write(line)

def try_parse_line_str(line):
prefix_full = 'read: "'
prefix = prefix_full[:-1]
if line.startswith(prefix_full):
return eval(line[len(prefix):])

def try_parse_line_bytes(line):
prefix = 'read:(bytes): '
if line.startswith(prefix):
return bytes(eval(line[len(prefix):])).decode("utf-8", "backslashreplace")

if __name__ == '__main__':
main()
4 changes: 2 additions & 2 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ default = ["wasm-runtime"]
wasm-runtime = ["namada/wasm-runtime"]

[dependencies]
namada = {path = "../shared", features = ["testing", "ibc-mocks"]}
namada = {path = "../shared", features = ["abciplus", "testing", "ibc-mocks"]}
namada_vm_env = {path = "../vm_env"}
chrono = {version = "0.4.22", default-features = false, features = ["clock", "std"]}
concat-idents = "1.1.2"
Expand All @@ -26,7 +26,7 @@ tracing-subscriber = {version = "0.3.7", default-features = false, features = ["
derivative = "2.2.0"

[dev-dependencies]
namada_apps = {path = "../apps", default-features = false, features = ["testing"]}
namada_apps = {path = "../apps", default-features = false, features = ["abciplus", "testing"]}
assert_cmd = "1.0.7"
borsh = "0.9.1"
color-eyre = "0.5.11"
Expand Down
2 changes: 2 additions & 0 deletions tests/src/e2e/eth_bridge_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ fn storage_key(path: &str) -> String {
}

#[test]
#[ignore]
// this test is outdated, so it is ignored
Comment on lines +22 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep (also badly named...). There was this PR to clean it up (anoma/anoma#1229) but that's a bit stale now probably. This test is still testing something we should continue testing (that a random actor cannot write arbitarily to EthBridge VP storage) but this test needs cleaning up.

fn everything() {
const LEDGER_STARTUP_TIMEOUT_SECONDS: u64 = 30;
const CLIENT_COMMAND_TIMEOUT_SECONDS: u64 = 30;
Expand Down
Loading