From ba79c9bdaec02f736c7f1799e5bf6844f3ddc1dd Mon Sep 17 00:00:00 2001 From: John Shahid Date: Tue, 15 Jul 2014 10:12:35 -0400 Subject: [PATCH] Fix the integration test suite to use the cluster type structures --- integration/multiple_servers_test.go | 3 ++- integration/single_server_test.go | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/integration/multiple_servers_test.go b/integration/multiple_servers_test.go index b9c5797c44..ea0e75aa37 100644 --- a/integration/multiple_servers_test.go +++ b/integration/multiple_servers_test.go @@ -12,6 +12,7 @@ import ( "time" influxdb "github.com/influxdb/influxdb/client" + "github.com/influxdb/influxdb/cluster" "github.com/influxdb/influxdb/common" . "github.com/influxdb/influxdb/integration/helpers" . "launchpad.net/gocheck" @@ -944,7 +945,7 @@ func (self *ServerSuite) TestDropShard(c *C) { endSeconds := startSeconds + 3600 client := self.serverProcesses[0].GetClient("", c) c.Assert(client.CreateDatabase("test_drop_shard"), IsNil) - space := &influxdb.ShardSpace{Name: "test_drop", RetentionPolicy: "30d", Database: "test_drop_shard", Regex: "/^dont_drop_me_bro/"} + space := &cluster.ShardSpace{Name: "test_drop", RetentionPolicy: "30d", Database: "test_drop_shard", Regex: "/^dont_drop_me_bro/"} c.Assert(client.CreateShardSpace(space), IsNil) data := fmt.Sprintf(`{ diff --git a/integration/single_server_test.go b/integration/single_server_test.go index c43bff84d2..5c42bb6b27 100644 --- a/integration/single_server_test.go +++ b/integration/single_server_test.go @@ -13,6 +13,7 @@ import ( "strconv" influxdb "github.com/influxdb/influxdb/client" + "github.com/influxdb/influxdb/cluster" . "github.com/influxdb/influxdb/integration/helpers" . "launchpad.net/gocheck" ) @@ -724,7 +725,7 @@ func (self *SingleServerSuite) TestCreateShardSpace(c *C) { c.Assert(spaces, HasLen, 1) c.Assert(spaces[0].Name, Equals, "default") - space := &influxdb.ShardSpace{Name: "month", RetentionPolicy: "30d", Database: "db1", Regex: "/^the_dude_abides/"} + space := &cluster.ShardSpace{Name: "month", RetentionPolicy: "30d", Database: "db1", Regex: "/^the_dude_abides/"} err = client.CreateShardSpace(space) c.Assert(err, IsNil) @@ -755,7 +756,7 @@ func (self *SingleServerSuite) getShardsForSpace(name string, shards []*influxdb return filteredShards } -func (self *SingleServerSuite) hasSpace(database, name string, spaces []*influxdb.ShardSpace) bool { +func (self *SingleServerSuite) hasSpace(database, name string, spaces []*cluster.ShardSpace) bool { for _, s := range spaces { if s.Name == name && s.Database == database { return true @@ -767,7 +768,7 @@ func (self *SingleServerSuite) hasSpace(database, name string, spaces []*influxd func (self *SingleServerSuite) TestDropShardSpace(c *C) { client := self.server.GetClient("", c) spaceName := "test_drop" - space := &influxdb.ShardSpace{Name: spaceName, RetentionPolicy: "30d", Database: "db1", Regex: "/^dont_drop_me_bro/"} + space := &cluster.ShardSpace{Name: spaceName, RetentionPolicy: "30d", Database: "db1", Regex: "/^dont_drop_me_bro/"} err := client.CreateShardSpace(space) c.Assert(err, IsNil)