Skip to content

Commit

Permalink
Use test.Diff from common
Browse files Browse the repository at this point in the history
  • Loading branch information
jml committed Dec 7, 2016
1 parent 496afb9 commit 1020fc5
Show file tree
Hide file tree
Showing 37 changed files with 39 additions and 37 deletions.
2 changes: 1 addition & 1 deletion app/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"golang.org/x/net/context"

"github.com/weaveworks/common/mtime"
"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/app"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion app/merger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"math/rand"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/app"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion app/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/ugorji/go/codec"
"golang.org/x/net/context"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/app"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
)

Expand Down
2 changes: 1 addition & 1 deletion common/weave/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"testing"

"github.com/weaveworks/common/exec"
"github.com/weaveworks/common/test"
testExec "github.com/weaveworks/common/test/exec"
"github.com/weaveworks/scope/common/weave"
"github.com/weaveworks/scope/test"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion probe/appclient/app_client_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

"github.com/gorilla/handlers"
"github.com/ugorji/go/codec"
"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/common/xfer"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
)

func dummyServer(t *testing.T, expectedToken, expectedID string, expectedVersion string, expectedReport report.Report, done chan struct{}) *httptest.Server {
Expand Down
2 changes: 1 addition & 1 deletion probe/controls/controls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"reflect"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/common/xfer"
"github.com/weaveworks/scope/probe/controls"
"github.com/weaveworks/scope/test"
)

func TestControls(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion probe/docker/controls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"testing"
"time"

commonTest "github.com/weaveworks/common/test"
"github.com/weaveworks/scope/common/xfer"
"github.com/weaveworks/scope/probe/controls"
"github.com/weaveworks/scope/probe/docker"
Expand Down Expand Up @@ -92,7 +93,7 @@ func TestPipes(t *testing.T) {
NodeID: report.MakeContainerNodeID("ping"),
})
if !reflect.DeepEqual(result, want.response) {
t.Errorf("diff %s: %s", want.control, test.Diff(want, result))
t.Errorf("diff %s: %s", want.control, commonTest.Diff(want, result))
}
}
})
Expand Down
3 changes: 2 additions & 1 deletion probe/docker/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
client "github.com/fsouza/go-dockerclient"

"github.com/weaveworks/common/mtime"
commonTest "github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/controls"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/report"
Expand Down Expand Up @@ -496,7 +497,7 @@ func TestRegistryDelete(t *testing.T) {
}),
}
if !reflect.DeepEqual(want, nodes) {
t.Errorf("Didn't get right container updates: %v", test.Diff(want, nodes))
t.Errorf("Didn't get right container updates: %v", commonTest.Diff(want, nodes))
}
nodes = []report.Node{}
mtx.Unlock()
Expand Down
2 changes: 1 addition & 1 deletion probe/endpoint/nat_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

"github.com/weaveworks/common/mtime"
"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion probe/endpoint/procspy/spy_linux_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"time"

fs_hook "github.com/weaveworks/common/fs"
"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/test"
)

func TestLinuxConnections(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion probe/plugins/registry_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"github.com/ugorji/go/codec"

fs_hook "github.com/weaveworks/common/fs"
"github.com/weaveworks/common/test"
"github.com/weaveworks/common/test/fs"
"github.com/weaveworks/scope/common/xfer"
"github.com/weaveworks/scope/probe/controls"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion probe/process/walker_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"

fs_hook "github.com/weaveworks/common/fs"
"github.com/weaveworks/common/test"
"github.com/weaveworks/common/test/fs"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/test"
)

var mockFS = fs.Dir("",
Expand Down
2 changes: 1 addition & 1 deletion probe/process/walker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"reflect"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/test"
)

func TestBasicWalk(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion render/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"net"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/render/expected"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
"github.com/weaveworks/scope/test/reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion render/detailed/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"reflect"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/render/detailed"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
)

Expand Down
2 changes: 1 addition & 1 deletion render/detailed/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"testing"
"time"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/host"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/render/detailed"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
)

Expand Down
2 changes: 1 addition & 1 deletion render/detailed/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/host"
"github.com/weaveworks/scope/probe/kubernetes"
Expand All @@ -12,7 +13,6 @@ import (
"github.com/weaveworks/scope/render/detailed"
"github.com/weaveworks/scope/render/expected"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
"github.com/weaveworks/scope/test/reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion render/detailed/parents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/render/detailed"
"github.com/weaveworks/scope/render/expected"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
"github.com/weaveworks/scope/test/reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion render/detailed/summary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"time"

"github.com/weaveworks/common/mtime"
"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/host"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/render/detailed"
"github.com/weaveworks/scope/render/expected"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
"github.com/weaveworks/scope/test/reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion render/detailed/tables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"reflect"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/render/detailed"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
)

Expand Down
2 changes: 1 addition & 1 deletion render/detailed/topology_diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"sort"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/render/detailed"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
)

// ByID is a sort interface for a NodeSummary slice.
Expand Down
2 changes: 1 addition & 1 deletion render/filters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package render_test
import (
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion render/host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package render_test
import (
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/render/expected"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
"github.com/weaveworks/scope/test/reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion render/memoise_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package render_test
import (
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion render/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"
"time"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion render/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package render_test
import (
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/kubernetes"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/render/expected"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
"github.com/weaveworks/scope/test/reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion render/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package render_test
import (
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/render/expected"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/fixture"
"github.com/weaveworks/scope/test/reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion render/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"reflect"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
)

type mockRenderer struct {
Expand Down
2 changes: 1 addition & 1 deletion render/theinternet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"reflect"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/probe/host"
"github.com/weaveworks/scope/render"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
)

func TestReportLocalNetworks(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion report/counters_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/ugorji/go/codec"

"github.com/weaveworks/scope/test"
"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion report/edge_metadatas_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/ugorji/go/codec"

"github.com/weaveworks/scope/test"
"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion report/latest_map_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/ugorji/go/codec"

"github.com/weaveworks/scope/test"
"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion report/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/ugorji/go/codec"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion report/networks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"net"
"testing"

"github.com/weaveworks/common/test"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
"github.com/weaveworks/scope/test/reflect"
)

Expand Down
Loading

0 comments on commit 1020fc5

Please sign in to comment.