swarm/network: Moved the test configuration inside the test function scope

This commit is contained in:
Attila Gazso 2018-07-31 16:06:02 +02:00
parent c807e0065b
commit 022c7f4d5f

View file

@ -255,15 +255,15 @@ func TestBzzHandshakeSuccess(t *testing.T) {
} }
} }
var lightNodeTests = []struct {
name string
lightNode bool
}{
{"on", true},
{"off", false},
}
func TestBzzHandshakeLightNode(t *testing.T) { func TestBzzHandshakeLightNode(t *testing.T) {
var lightNodeTests = []struct {
name string
lightNode bool
}{
{"on", true},
{"off", false},
}
for _, test := range lightNodeTests { for _, test := range lightNodeTests {
t.Run(test.name, func(t *testing.T) { t.Run(test.name, func(t *testing.T) {
randomAddr := RandomAddr() randomAddr := RandomAddr()