aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm/run_test.go
diff options
context:
space:
mode:
authorElad <theman@elad.im>2018-10-09 20:08:40 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-10-09 20:08:40 +0800
commitda290e9707d6b3074b571722bbb557815b03ad48 (patch)
treedbb7a5c62330bc3f9a862f2eacc067c477e16719 /cmd/swarm/run_test.go
parent0fe9a372b3ff9fd0746c3e271bd0ddddd3412122 (diff)
downloaddexon-da290e9707d6b3074b571722bbb557815b03ad48.tar
dexon-da290e9707d6b3074b571722bbb557815b03ad48.tar.gz
dexon-da290e9707d6b3074b571722bbb557815b03ad48.tar.bz2
dexon-da290e9707d6b3074b571722bbb557815b03ad48.tar.lz
dexon-da290e9707d6b3074b571722bbb557815b03ad48.tar.xz
dexon-da290e9707d6b3074b571722bbb557815b03ad48.tar.zst
dexon-da290e9707d6b3074b571722bbb557815b03ad48.zip
cmd/swarm: speed up tests (#17878)
These minor changes already shaved off around 30s.
Diffstat (limited to 'cmd/swarm/run_test.go')
-rw-r--r--cmd/swarm/run_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/swarm/run_test.go b/cmd/swarm/run_test.go
index 6d2a86f4b..55199e955 100644
--- a/cmd/swarm/run_test.go
+++ b/cmd/swarm/run_test.go
@@ -40,6 +40,9 @@ import (
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/swarm"
+ "github.com/ethereum/go-ethereum/swarm/api"
+ swarmhttp "github.com/ethereum/go-ethereum/swarm/api/http"
+ "github.com/ethereum/go-ethereum/swarm/testutil"
)
var loglevel = flag.Int("loglevel", 3, "verbosity of logs")
@@ -55,6 +58,9 @@ func init() {
})
}
+func serverFunc(api *api.API) testutil.TestServer {
+ return swarmhttp.NewServer(api, "")
+}
func TestMain(m *testing.M) {
// check if we have been reexec'd
if reexec.Init() {