From 291bb51882f22c227592b41969fa1abe2c9b7410 Mon Sep 17 00:00:00 2001 From: Florian Franzen Date: Thu, 2 Jun 2022 10:52:49 +0200 Subject: [PATCH] HostFixture: retire gossamer config --- helpers/HostFixture.jl | 20 ++++------- .../tester/gossamer.docker.raw.config.toml | 34 ------------------- runtimes/tester/gossamer.raw.config.toml | 34 ------------------- 3 files changed, 7 insertions(+), 81 deletions(-) delete mode 100644 runtimes/tester/gossamer.docker.raw.config.toml delete mode 100644 runtimes/tester/gossamer.raw.config.toml diff --git a/helpers/HostFixture.jl b/helpers/HostFixture.jl index 8e350859..cfdec43e 100644 --- a/helpers/HostFixture.jl +++ b/helpers/HostFixture.jl @@ -44,16 +44,11 @@ function run_tester(self::Tester, host::String, duration::Number) @error "Failed to locate genesis: $genesis" end - # Helper files needed for some hosts - keystore = "$(@__DIR__)/../runtimes/$(self.runtime)/keystore" + # [gossamer] Provide empty dummy config + config, _ = mktemp() - config = "$(@__DIR__)/../runtimes/$(self.runtime)/gossamer." - if Config.docker - config *= "docker." - end - config *= if self.raw "raw" else "json" end * ".config.toml" - - # Copy prepopulated kagome keystore (TODO: Load chain id from genesis) + # [kagome] Provide populated keystore (TODO: Load chain id from genesis) + keystore = "$(@__DIR__)/../runtimes/$(self.runtime)/keystore" mkpath(joinpath(tempdir, "spectest")) cp(keystore, joinpath(tempdir, "spectest", "keystore")) @@ -73,7 +68,6 @@ function run_tester(self::Tester, host::String, duration::Number) end # Prepare command and environment based on command - cmd = `` args = `` if host == "substrate" exec = `polkadot` @@ -84,7 +78,7 @@ function run_tester(self::Tester, host::String, duration::Number) args = `--chain $genesis -d $datadir --bootnodes /dns/localhost/tcp/30363/p2p/12D3KooWEgUjBV5FJAuBSoNMRYFRHjV7PjZwRQ7b43EKX9g7D6xV` elseif host == "gossamer" exec = `gossamer` - args = `--key=alice --config $config --basepath $datadir --log debug` + args = `--key=alice --genesis $genesis --config $config --basepath $datadir --log debug` else error("Unknown host: ", host) end @@ -111,7 +105,7 @@ function run_tester(self::Tester, host::String, duration::Number) # Run for specified time stream = Pipe() - proc = run(pipeline(cmd, stdout=stream, stderr=stream), wait=false) + proc = run(pipeline(cmd, stdout = stream, stderr = stream), wait = false) sleep(duration) # Stop process if necessary @@ -119,7 +113,7 @@ function run_tester(self::Tester, host::String, duration::Number) if !crashed kill(proc) - while(process_running(proc)) + while (process_running(proc)) sleep(0.1) end end diff --git a/runtimes/tester/gossamer.docker.raw.config.toml b/runtimes/tester/gossamer.docker.raw.config.toml deleted file mode 100644 index fd0f85c8..00000000 --- a/runtimes/tester/gossamer.docker.raw.config.toml +++ /dev/null @@ -1,34 +0,0 @@ -[global] -name = "Specification Conformance Test" -id = "spectest" - -[log] -core = "" -network = "" -rpc = "" -state = "" -runtime = "" -babe = "" -grandpa = "" - -[init] -genesis = "/config/genesis.raw.json" - -[core] -roles = 4 -babe-authority = true -grandpa-authority = true - -[network] -port = 7001 -bootnodes = [] -protocol = "" -nobootstrap = true -nomdns = true - -[rpc] -enabled = false -port = 8545 -host = "localhost" -modules = ["system", "author", "chain"] -ws-port = 8546 diff --git a/runtimes/tester/gossamer.raw.config.toml b/runtimes/tester/gossamer.raw.config.toml deleted file mode 100644 index 8ec51f3e..00000000 --- a/runtimes/tester/gossamer.raw.config.toml +++ /dev/null @@ -1,34 +0,0 @@ -[global] -name = "Specification Conformance Test Runtime" -id = "spectest" - -[log] -core = "" -network = "" -rpc = "" -state = "" -runtime = "" -babe = "" -grandpa = "" - -[init] -genesis = "./runtimes/tester/genesis.raw.json" - -[core] -roles = 4 -babe-authority = true -grandpa-authority = true - -[network] -port = 7001 -bootnodes = [] -protocol = "" -nobootstrap = true -nomdns = true - -[rpc] -enabled = false -port = 8545 -host = "localhost" -modules = ["system", "author", "chain"] -ws-port = 8546