Add ScheduleArgs interface for autoscale policies
diff --git a/rackspace/autoscale/v1/policies/requests_test.go b/rackspace/autoscale/v1/policies/requests_test.go
index 3f7bb88..88a52a7 100644
--- a/rackspace/autoscale/v1/policies/requests_test.go
+++ b/rackspace/autoscale/v1/policies/requests_test.go
@@ -2,6 +2,7 @@
import (
"testing"
+ "time"
"github.com/rackspace/gophercloud/pagination"
th "github.com/rackspace/gophercloud/testhelper"
@@ -53,6 +54,7 @@
defer th.TeardownHTTP()
HandlePolicyCreateSuccessfully(t)
+ oneTime := time.Date(2020, time.April, 01, 23, 0, 0, 0, time.UTC)
client := client.ServiceClient()
opts := CreateOpts{
{
@@ -67,18 +69,14 @@
Type: Schedule,
AdjustmentType: Change,
AdjustmentValue: -1,
- Args: map[string]interface{}{
- "at": "2020-04-01T23:00:00.000Z",
- },
+ Schedule: At(oneTime),
},
{
Name: "sunday afternoon",
Type: Schedule,
AdjustmentType: DesiredCapacity,
AdjustmentValue: 2,
- Args: map[string]interface{}{
- "cron": "59 15 * * 0",
- },
+ Schedule: Cron("59 15 * * 0"),
},
}