Skip to content

Commit

Permalink
Merge pull request #2061 from weaveworks/use-common-lib
Browse files Browse the repository at this point in the history
Use newly-created 'common' repo
  • Loading branch information
jml authored Dec 7, 2016
2 parents 9d5d431 + 1020fc5 commit 9a92961
Show file tree
Hide file tree
Showing 197 changed files with 21,840 additions and 161 deletions.
2 changes: 1 addition & 1 deletion app/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/ugorji/go/codec"
"golang.org/x/net/context"

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

Expand Down
4 changes: 2 additions & 2 deletions app/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ 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/common/mtime"
"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/multitenant/aws_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/net/context"

"github.com/weaveworks/common/instrument"
"github.com/weaveworks/scope/app"
"github.com/weaveworks/scope/common/instrument"
"github.com/weaveworks/scope/report"
)

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

"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/app"
"github.com/weaveworks/scope/common/mtime"
"github.com/weaveworks/scope/common/xfer"
)

Expand Down
2 changes: 1 addition & 1 deletion app/multitenant/memcache_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/net/context"

"github.com/weaveworks/scope/common/instrument"
"github.com/weaveworks/common/instrument"
"github.com/weaveworks/scope/report"
)

Expand Down
2 changes: 1 addition & 1 deletion app/multitenant/s3_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/net/context"

"github.com/weaveworks/scope/common/instrument"
"github.com/weaveworks/common/instrument"
"github.com/weaveworks/scope/report"
)

Expand Down
2 changes: 1 addition & 1 deletion app/multitenant/sqs_control_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/net/context"

"github.com/weaveworks/common/instrument"
"github.com/weaveworks/scope/app"
"github.com/weaveworks/scope/common/instrument"
"github.com/weaveworks/scope/common/xfer"
)

Expand Down
2 changes: 1 addition & 1 deletion app/pipe_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
log "github.com/Sirupsen/logrus"
"golang.org/x/net/context"

"github.com/weaveworks/scope/common/mtime"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/common/xfer"
)

Expand Down
2 changes: 1 addition & 1 deletion app/pipes_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/gorilla/websocket"
"golang.org/x/net/context"

"github.com/weaveworks/scope/common/mtime"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/common/xfer"
"github.com/weaveworks/scope/probe/appclient"
"github.com/weaveworks/scope/probe/controls"
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 app/weave.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

fsouza "github.com/fsouza/go-dockerclient"

"github.com/weaveworks/scope/common/backoff"
"github.com/weaveworks/common/backoff"
)

// Default values for weave app integration
Expand Down
30 changes: 0 additions & 30 deletions common/middleware/instrument_test.go

This file was deleted.

37 changes: 0 additions & 37 deletions common/sanitize/sanitize_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion common/weave/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/ugorji/go/codec"

"github.com/weaveworks/scope/common/exec"
"github.com/weaveworks/common/exec"
)

// Client for Weave Net API
Expand Down
6 changes: 3 additions & 3 deletions common/weave/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"sync"
"testing"

"github.com/weaveworks/scope/common/exec"
"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"
testExec "github.com/weaveworks/scope/test/exec"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion common/xfer/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/gorilla/websocket"
"github.com/ugorji/go/codec"

"github.com/weaveworks/scope/common/mtime"
"github.com/weaveworks/common/mtime"
)

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
2 changes: 1 addition & 1 deletion probe/docker/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
log "github.com/Sirupsen/logrus"
docker "github.com/fsouza/go-dockerclient"

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

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

client "github.com/fsouza/go-dockerclient"

"github.com/weaveworks/scope/common/mtime"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
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
5 changes: 3 additions & 2 deletions probe/docker/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (

client "github.com/fsouza/go-dockerclient"

"github.com/weaveworks/scope/common/mtime"
"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/docker/tagger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/weaveworks/scope/common/mtime"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/report"
Expand Down
2 changes: 1 addition & 1 deletion probe/endpoint/conntrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

log "github.com/Sirupsen/logrus"

"github.com/weaveworks/scope/common/exec"
"github.com/weaveworks/common/exec"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions probe/endpoint/conntrack_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"testing"
"time"

"github.com/weaveworks/scope/common/exec"
"github.com/weaveworks/common/exec"
testexec "github.com/weaveworks/common/test/exec"
"github.com/weaveworks/scope/test"
testexec "github.com/weaveworks/scope/test/exec"
)

const conntrackCloseTag = "</conntrack>\n"
Expand Down
4 changes: 2 additions & 2 deletions probe/endpoint/nat_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package endpoint
import (
"testing"

"github.com/weaveworks/scope/common/mtime"
"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
4 changes: 2 additions & 2 deletions probe/endpoint/procspy/proc_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"testing"
"time"

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

var mockFS = fs.Dir("",
Expand Down
2 changes: 1 addition & 1 deletion probe/endpoint/procspy/proc_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
log "github.com/Sirupsen/logrus"
"github.com/armon/go-metrics"

"github.com/weaveworks/scope/common/fs"
"github.com/weaveworks/common/fs"
"github.com/weaveworks/scope/common/marshal"
"github.com/weaveworks/scope/probe/process"
)
Expand Down
4 changes: 2 additions & 2 deletions probe/endpoint/procspy/spy_linux_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"
"time"

fs_hook "github.com/weaveworks/scope/common/fs"
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/host/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/weaveworks/scope/common/mtime"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/probe/controls"
"github.com/weaveworks/scope/report"
)
Expand Down
2 changes: 1 addition & 1 deletion probe/host/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/weaveworks/scope/common/mtime"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/probe/controls"
"github.com/weaveworks/scope/probe/host"
"github.com/weaveworks/scope/report"
Expand Down
2 changes: 1 addition & 1 deletion probe/kubernetes/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/labels"

"github.com/weaveworks/scope/common/mtime"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/probe"
"github.com/weaveworks/scope/probe/controls"
"github.com/weaveworks/scope/probe/docker"
Expand Down
Loading

0 comments on commit 9a92961

Please sign in to comment.