Failed test cases

This commit is contained in:
Ayu Demura 2016-07-25 09:41:50 -04:00
parent 27dc29ce28
commit f50c6b9128
6 changed files with 23 additions and 15 deletions

View File

@ -14,7 +14,8 @@ func resourcePacketIPAddress() *schema.Resource {
Schema: map[string]*schema.Schema{
"address": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Required: true,
ForceNew: true,
},
"gateway": &schema.Schema{
@ -28,12 +29,12 @@ func resourcePacketIPAddress() *schema.Resource {
},
"family": &schema.Schema{
Type: schema.TypeInt,
Type: schema.TypeString,
Computed: true,
},
"netmask": &schema.Schema{
Type: schema.TypeInt,
Type: schema.TypeString,
Computed: true,
},
@ -48,7 +49,7 @@ func resourcePacketIPAddress() *schema.Resource {
},
"assigned_to": &schema.Schema{
Type: schema.TypeBool,
Type: schema.TypeString,
Computed: true,
},

View File

@ -28,7 +28,7 @@ func resourcePacketIPReservation() *schema.Resource {
},
"family": &schema.Schema{
Type: schema.TypeInt,
Type: schema.TypeString,
Computed: true,
},

View File

@ -23,7 +23,7 @@ func TestAccPacketIPReservation_Basic(t *testing.T) {
testAccCheckPacketIPReservationExists("packet_ip_reservation.foobar", &ip_reservation),
testAccCheckPacketIPReservationAttributes(&ip_reservation),
resource.TestCheckResourceAttr(
"packet_ip_reservation.foobar", "address", "foobar"),
"packet_ip_reservation", "foobar", "{}"),
),
},
},
@ -81,6 +81,4 @@ func testAccCheckPacketIPReservationExists(n string, ip_reservation *packngo.IPR
}
var testAccCheckPacketIPReservationConfig_basic = fmt.Sprintf(`
resource "packet_ip_reservation" "foobar" {
address = "foobar"
}`)
resource "packet_ip_reservation" "foobar" {}`)

View File

@ -23,7 +23,13 @@ func TestAccPacketVolume_Basic(t *testing.T) {
testAccCheckPacketVolumeExists("packet_volume.foobar", &volume),
testAccCheckPacketVolumeAttributes(&volume),
resource.TestCheckResourceAttr(
"packet_volume.foobar", "name", "foobar"),
"packet_volume.foobar", "project_id", "foobar"),
resource.TestCheckResourceAttr(
"packet_volume.foobar", "plan", "foobar"),
resource.TestCheckResourceAttr(
"packet_volume.foobar", "facility", "foobar"),
resource.TestCheckResourceAttr(
"packet_volume.foobar", "billing_cycle", "hourly"),
),
},
},
@ -82,5 +88,8 @@ func testAccCheckPacketVolumeExists(n string, volume *packngo.Volume) resource.T
var testAccCheckPacketVolumeConfig_basic = fmt.Sprintf(`
resource "packet_volume" "foobar" {
name = "foobar"
project_id = "foobar"
plan = "foobar"
facility = "foobar"
billing_cycle = "hourly"
}`)

View File

@ -36,7 +36,7 @@ type SnapshotPolicy struct {
ID string `json:"id"`
Href string `json:"href"`
SnapshotFrequency string `json:"snapshot_frequency,omitempty"`
snapshot_count int `json:"snapshot_count,omitempty"`
SnapshotCount int `json:"snapshot_count,omitempty"`
}
// Attachment used to execute actions on volume

6
vendor/vendor.json vendored
View File

@ -1464,10 +1464,10 @@
"revision": "3d184cea22ee1c41ec1697e0d830ff0c78f7ea97"
},
{
"checksumSHA1": "/r0HjrIkynh4Gj0EIAKirEKP/Rk=",
"checksumSHA1": "bpR9eoBfEDcXrm5Q0By4cDDlXo8=",
"path": "github.com/packethost/packngo",
"revision": "1bf5adfc4f590757da03407f576c46569a9c04b0",
"revisionTime": "2016-07-22T15:57:43Z"
"revision": "5c74c3276242fb359a06b643437a9d8903eb76e6",
"revisionTime": "2016-07-26T11:06:53Z"
},
{
"path": "github.com/pborman/uuid",