Browse Source

*: rename internal packages in tools/testing

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 7 years ago
parent
commit
7dabd6c255
3 changed files with 6 additions and 6 deletions
  1. 1 1
      functional/rpcpb/member.go
  2. 1 1
      tests/e2e/ctl_v3_snapshot_test.go
  3. 4 4
      tools/etcd-dump-logs/main.go

+ 1 - 1
functional/rpcpb/member.go

@@ -23,9 +23,9 @@ import (
 	"time"
 
 	"github.com/coreos/etcd/clientv3"
+	"github.com/coreos/etcd/clientv3/snapshot"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/pkg/transport"
-	"github.com/coreos/etcd/snapshot"
 
 	"github.com/dustin/go-humanize"
 	"go.uber.org/zap"

+ 1 - 1
tests/e2e/ctl_v3_snapshot_test.go

@@ -25,9 +25,9 @@ import (
 	"testing"
 	"time"
 
+	"github.com/coreos/etcd/clientv3/snapshot"
 	"github.com/coreos/etcd/pkg/expect"
 	"github.com/coreos/etcd/pkg/testutil"
-	"github.com/coreos/etcd/snapshot"
 )
 
 func TestCtlV3Snapshot(t *testing.T) { testCtl(t, snapshotTest) }

+ 4 - 4
tools/etcd-dump-logs/main.go

@@ -22,11 +22,11 @@ import (
 	"strings"
 	"time"
 
+	"github.com/coreos/etcd/etcdserver/api/snap"
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/pkg/pbutil"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/raft/raftpb"
-	"github.com/coreos/etcd/raftsnap"
 	"github.com/coreos/etcd/wal"
 	"github.com/coreos/etcd/wal/walpb"
 
@@ -65,10 +65,10 @@ func main() {
 		walsnap.Index = *index
 	} else {
 		if *snapfile == "" {
-			ss := raftsnap.New(zap.NewExample(), snapDir(dataDir))
+			ss := snap.New(zap.NewExample(), snapDir(dataDir))
 			snapshot, err = ss.Load()
 		} else {
-			snapshot, err = raftsnap.Read(zap.NewExample(), filepath.Join(snapDir(dataDir), *snapfile))
+			snapshot, err = snap.Read(zap.NewExample(), filepath.Join(snapDir(dataDir), *snapfile))
 		}
 
 		switch err {
@@ -77,7 +77,7 @@ func main() {
 			nodes := genIDSlice(snapshot.Metadata.ConfState.Nodes)
 			fmt.Printf("Snapshot:\nterm=%d index=%d nodes=%s\n",
 				walsnap.Term, walsnap.Index, nodes)
-		case raftsnap.ErrNoSnapshot:
+		case snap.ErrNoSnapshot:
 			fmt.Printf("Snapshot:\nempty\n")
 		default:
 			log.Fatalf("Failed loading snapshot: %v", err)