File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 25
25
- uses : actions/checkout@v3
26
26
- uses : ./.github/actions
27
27
- run : ./test/rpc_test.py
28
+ graph :
29
+ runs-on : ubuntu-latest
30
+ steps :
31
+ - uses : actions/checkout@v3
32
+ - uses : ./.github/actions
33
+ - run : ./test/test_graph.py
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+ import tempfile
3
+ import uuid
4
+ from pathlib import Path
5
+ from test_base import TestBase
6
+ from warnet .utils import DEFAULT_TAG
7
+
8
+ base = TestBase ()
9
+ base .network = False
10
+ base .start_server ()
11
+
12
+ with tempfile .TemporaryDirectory () as dir :
13
+ tf = f"{ dir } /{ str (uuid .uuid4 ())} .graphml"
14
+ print (f"Writing test graph to { tf } " )
15
+ print (base .warcli (f"graph create n=10 --outfile={ tf } --version={ DEFAULT_TAG } " , network = False ))
16
+ base .wait_for_predicate (lambda : Path (tf ).exists ())
17
+
18
+ # Test that the graph actually works
19
+ print (base .warcli (f"network start { Path (tf )} " ))
20
+ base .wait_for_all_tanks_status (target = "running" )
21
+ base .warcli ("rpc 0 getblockcount" )
22
+
23
+ base .stop_server ()
You can’t perform that action at this time.
0 commit comments