at 25.11-pre 1.6 kB view raw
1import ./make-test-python.nix ( 2 { pkgs, ... }: 3 { 4 name = "geth"; 5 meta = with pkgs.lib; { 6 maintainers = with maintainers; [ bachp ]; 7 }; 8 9 nodes.machine = 10 { ... }: 11 { 12 services.geth."mainnet" = { 13 enable = true; 14 http = { 15 enable = true; 16 }; 17 }; 18 19 services.geth."holesky" = { 20 enable = true; 21 port = 30304; 22 network = "holesky"; 23 http = { 24 enable = true; 25 port = 18545; 26 }; 27 authrpc = { 28 enable = true; 29 port = 18551; 30 }; 31 }; 32 33 services.geth."sepolia" = { 34 enable = true; 35 port = 30305; 36 network = "sepolia"; 37 http = { 38 enable = true; 39 port = 28545; 40 }; 41 authrpc = { 42 enable = true; 43 port = 28551; 44 }; 45 }; 46 }; 47 48 testScript = '' 49 start_all() 50 51 machine.wait_for_unit("geth-mainnet.service") 52 machine.wait_for_unit("geth-holesky.service") 53 machine.wait_for_unit("geth-sepolia.service") 54 machine.wait_for_open_port(8545) 55 machine.wait_for_open_port(18545) 56 machine.wait_for_open_port(28545) 57 58 machine.succeed( 59 'geth attach --exec "eth.blockNumber" http://localhost:8545 | grep \'^0$\' ' 60 ) 61 62 machine.succeed( 63 'geth attach --exec "eth.blockNumber" http://localhost:18545 | grep \'^0$\' ' 64 ) 65 66 machine.succeed( 67 'geth attach --exec "eth.blockNumber" http://localhost:28545 | grep \'^0$\' ' 68 ) 69 ''; 70 } 71)