Skip to content

Commit 8004273

Browse files
committed
use list instead of cmap in tests
1 parent 95a4764 commit 8004273

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

relaystats/nustore/model_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func handle_err(t *testing.T, err error) {
1717
}
1818

1919
func TestArchive(t *testing.T) {
20-
ns := relaystats.NewNetStats(map_counter.NewCMap)
20+
ns := relaystats.NewNetStats(map_counter.NewList)
2121

2222
if !ns.Enabled() {
2323
t.Error("Netstats not initialised")
@@ -96,7 +96,7 @@ func TestArchive(t *testing.T) {
9696
}
9797

9898
func TestArchiveActiveCT(t *testing.T) {
99-
ns := relaystats.NewNetStats(map_counter.NewCMap)
99+
ns := relaystats.NewNetStats(map_counter.NewList)
100100

101101
if !ns.Enabled() {
102102
t.Error("Netstats not initialised")

relaystats/stats_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"testing"
77
"time"
88

9-
"github.com/wireleap/relay/api/map_counter"
109
"github.com/wireleap/relay/api/epoch"
10+
"github.com/wireleap/relay/api/map_counter"
1111
)
1212

1313
func TestNetStatsLoadSave(t *testing.T) {
@@ -61,7 +61,7 @@ func TestNetStatsLoadSave(t *testing.T) {
6161
}
6262

6363
func TestNetStatsInit(t *testing.T) {
64-
ns := NewNetStats(map_counter.NewCMap)
64+
ns := NewNetStats(map_counter.NewList)
6565

6666
if !ns.Enabled() {
6767
t.Error("Netstats not initialised")
@@ -75,7 +75,7 @@ func TestNetStatsInit(t *testing.T) {
7575
}
7676

7777
func TestNetStatsReset(t *testing.T) {
78-
ns := NewNetStats(map_counter.NewCMap)
78+
ns := NewNetStats(map_counter.NewList)
7979

8080
if !ns.Enabled() {
8181
t.Error("Netstats not initialised")
@@ -116,7 +116,7 @@ func TestNetStatsReset(t *testing.T) {
116116
}
117117

118118
func TestNetStatsGetNextReset(t *testing.T) {
119-
ns := NewNetStats(map_counter.NewCMap)
119+
ns := NewNetStats(map_counter.NewList)
120120

121121
if !ns.Enabled() {
122122
t.Error("Netstats not initialised")

0 commit comments

Comments
 (0)