Fixing tests
diff --git a/acceptance/rackspace/lb/v1/acl_test.go b/acceptance/rackspace/lb/v1/acl_test.go
index c61f462..7a38027 100644
--- a/acceptance/rackspace/lb/v1/acl_test.go
+++ b/acceptance/rackspace/lb/v1/acl_test.go
@@ -13,7 +13,6 @@
)
func TestACL(t *testing.T) {
- return
client := setup(t)
ids := createLB(t, client, 1)
diff --git a/acceptance/rackspace/lb/v1/lb_test.go b/acceptance/rackspace/lb/v1/lb_test.go
index 8038092..c67ddec 100644
--- a/acceptance/rackspace/lb/v1/lb_test.go
+++ b/acceptance/rackspace/lb/v1/lb_test.go
@@ -171,6 +171,8 @@
th.AssertNoErr(t, err)
t.Logf("LB %d log enabled? %s", id, strconv.FormatBool(res))
+ waitForLB(client, id, lbs.ACTIVE)
+
err = lbs.DisableLogging(client, id).ExtractErr()
th.AssertNoErr(t, err)
t.Logf("Disabled logging for LB %d", id)
@@ -196,3 +198,17 @@
t.Logf("Stats for LB %d: %#v", id, stats)
}
+
+func checkCaching(t *testing.T, client *gophercloud.ServiceClient, id int) {
+ err := lbs.EnableCaching(client, id).ExtractErr()
+ th.AssertNoErr(t, err)
+ t.Logf("Enabled caching for LB %d", id)
+
+ res, err := lbs.IsContentCached(client, id)
+ th.AssertNoErr(t, err)
+ t.Logf("Is caching enabled for LB? %s", strconv.FormatBool(res))
+
+ err = lbs.DisableCaching(client, id).ExtractErr()
+ th.AssertNoErr(t, err)
+ t.Logf("Disabled caching for LB %d", id)
+}
diff --git a/acceptance/rackspace/lb/v1/monitor_test.go b/acceptance/rackspace/lb/v1/monitor_test.go
index a198c04..c1a8e24 100644
--- a/acceptance/rackspace/lb/v1/monitor_test.go
+++ b/acceptance/rackspace/lb/v1/monitor_test.go
@@ -12,7 +12,6 @@
)
func TestMonitors(t *testing.T) {
- return
client := setup(t)
ids := createLB(t, client, 1)
diff --git a/acceptance/rackspace/lb/v1/node_test.go b/acceptance/rackspace/lb/v1/node_test.go
index 0b9e86f..18b9fe7 100644
--- a/acceptance/rackspace/lb/v1/node_test.go
+++ b/acceptance/rackspace/lb/v1/node_test.go
@@ -17,7 +17,6 @@
)
func TestNodes(t *testing.T) {
- return
client := setup(t)
serverIP := findServer(t)
@@ -35,6 +34,9 @@
listEvents(t, client, lbID)
deleteNode(t, client, lbID, nodeID)
+
+ waitForLB(client, lbID, lbs.ACTIVE)
+ deleteLB(t, client, lbID)
}
func findServer(t *testing.T) string {
diff --git a/acceptance/rackspace/lb/v1/session_test.go b/acceptance/rackspace/lb/v1/session_test.go
index d71514e..8d85655 100644
--- a/acceptance/rackspace/lb/v1/session_test.go
+++ b/acceptance/rackspace/lb/v1/session_test.go
@@ -11,7 +11,6 @@
)
func TestSession(t *testing.T) {
- return
client := setup(t)
ids := createLB(t, client, 1)
diff --git a/acceptance/rackspace/lb/v1/throttle_test.go b/acceptance/rackspace/lb/v1/throttle_test.go
index f0a69d5..1cc1235 100644
--- a/acceptance/rackspace/lb/v1/throttle_test.go
+++ b/acceptance/rackspace/lb/v1/throttle_test.go
@@ -11,7 +11,6 @@
)
func TestThrottle(t *testing.T) {
- return
client := setup(t)
ids := createLB(t, client, 1)
@@ -35,7 +34,13 @@
}
func createThrottleConfig(t *testing.T, client *gophercloud.ServiceClient, lbID int) {
- opts := throttle.CreateOpts{MaxConnections: 200}
+ opts := throttle.CreateOpts{
+ MaxConnections: 200,
+ MaxConnectionRate: 100,
+ MinConnections: 0,
+ RateInterval: 10,
+ }
+
err := throttle.Create(client, lbID, opts).ExtractErr()
th.AssertNoErr(t, err)
t.Logf("Enable throttling for %d", lbID)
diff --git a/acceptance/rackspace/lb/v1/vip_test.go b/acceptance/rackspace/lb/v1/vip_test.go
index e594093..bc0c2a8 100644
--- a/acceptance/rackspace/lb/v1/vip_test.go
+++ b/acceptance/rackspace/lb/v1/vip_test.go
@@ -13,7 +13,6 @@
)
func TestVIPs(t *testing.T) {
- return
client := setup(t)
ids := createLB(t, client, 1)
@@ -26,6 +25,9 @@
deleteVIP(t, client, lbID, vipIDs[0])
bulkDeleteVIPs(t, client, lbID, vipIDs[1:])
+
+ waitForLB(client, lbID, lbs.ACTIVE)
+ deleteLB(t, client, lbID)
}
func listVIPs(t *testing.T, client *gophercloud.ServiceClient, lbID int) {