diff options
author | Dario Maiocchi <dmaiocchi@suse.com> | 2017-11-16 16:49:53 +0100 |
---|---|---|
committer | Dario Maiocchi <dmaiocchi@suse.com> | 2017-11-16 16:49:53 +0100 |
commit | 03b52b7f1c82bbfa3291b6517aaebdb8dd5ae2d1 (patch) | |
tree | 381a50202a08e2d5db13c010c643726a64cc158c /libvirt/qemu_agent_test.go | |
parent | acad5df18a9ffd03d6f6bdd2b33f4eade8e9a09d (diff) | |
download | terraform-provider-libvirt-03b52b7f1c82bbfa3291b6517aaebdb8dd5ae2d1.tar terraform-provider-libvirt-03b52b7f1c82bbfa3291b6517aaebdb8dd5ae2d1.tar.gz |
remove duplicata declaration and simplify code.
This fix is with the cmd "gofmt -w -s *"
Diffstat (limited to 'libvirt/qemu_agent_test.go')
-rw-r--r-- | libvirt/qemu_agent_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libvirt/qemu_agent_test.go b/libvirt/qemu_agent_test.go index b38cd9d3..03546054 100644 --- a/libvirt/qemu_agent_test.go +++ b/libvirt/qemu_agent_test.go @@ -38,11 +38,11 @@ func TestGetDomainInterfacesViaQemuAgentNoInterfaces(t *testing.T) { func TestGetDomainInterfacesViaQemuAgentIgnoreLoopbackDevice(t *testing.T) { response := QemuAgentInterfacesResponse{ Interfaces: []QemuAgentInterface{ - QemuAgentInterface{ + { Name: "lo", Hwaddr: "ho:me", IPAddresses: []QemuAgentInterfaceIPAddress{ - QemuAgentInterfaceIPAddress{ + { Type: "ipv4", Address: "127.0.0.1", Prefix: 1, @@ -69,11 +69,11 @@ func TestGetDomainInterfacesViaQemuAgentIgnoreLoopbackDevice(t *testing.T) { func TestGetDomainInterfacesViaQemuAgentIgnoreDevicesWithoutAddress(t *testing.T) { response := QemuAgentInterfacesResponse{ Interfaces: []QemuAgentInterface{ - QemuAgentInterface{ + { Name: "eth1", Hwaddr: "xy:yy:zz", IPAddresses: []QemuAgentInterfaceIPAddress{ - QemuAgentInterfaceIPAddress{ + { Type: "ipv4", Address: "", Prefix: 1, @@ -100,11 +100,11 @@ func TestGetDomainInterfacesViaQemuAgentIgnoreDevicesWithoutAddress(t *testing.T func TestGetDomainInterfacesViaQemuAgentUnknownIpAddressType(t *testing.T) { response := QemuAgentInterfacesResponse{ Interfaces: []QemuAgentInterface{ - QemuAgentInterface{ + { Name: "eth2", Hwaddr: "zy:yy:zz", IPAddresses: []QemuAgentInterfaceIPAddress{ - QemuAgentInterfaceIPAddress{ + { Type: "ipv8", Address: "i don't exist", Prefix: 1, @@ -136,16 +136,16 @@ func TestGetDomainInterfacesViaQemuAgent(t *testing.T) { response := QemuAgentInterfacesResponse{ Interfaces: []QemuAgentInterface{ - QemuAgentInterface{ + { Name: device, Hwaddr: mac, IPAddresses: []QemuAgentInterfaceIPAddress{ - QemuAgentInterfaceIPAddress{ + { Type: "ipv4", Address: ipv4Addr, Prefix: 1, }, - QemuAgentInterfaceIPAddress{ + { Type: "ipv6", Address: ipv6Addr, Prefix: 1, |