aim@spicy:~/gomaasapi (subnets-not-nil) (maas19-home)
$ make
go test -v ./...
=== RUN Test
----------------------------------------------------------------------
FAIL: testservice_test.go:633: TestServerSuite.TestSpaces
testservice_test.go:666:
c.Assert(spaces, DeepEquals, expectedSpaces)
... obtained []gomaasapi.Space = []gomaasapi.Space{gomaasapi.Space{Name:"foo", Subnets:[]gomaasapi.Subnet{gomaasapi.Subnet{DNSServers:[]string{"192.168.1.2"}, Name:"maas-eth1", Space:"foo", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.1.1", CIDR:"192.168.1.0/24", ResourceURI:"", ID:0x1, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}, gomaasapi.Subnet{DNSServers:[]string{"192.168.2.2"}, Name:"maas-eth2", Space:"foo", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.2.1", CIDR:"192.168.2.0/24", ResourceURI:"", ID:0x2, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}, gomaasapi.Subnet{DNSServers:[]string{"192.168.3.2"}, Name:"maas-eth3", Space:"foo", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.3.1", CIDR:"192.168.3.0/24", ResourceURI:"", ID:0x3, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}}, ResourceURI:"/api/1.0/spaces/1/", ID:0x1}, gomaasapi.Space{Name:"bar", Subnets:[]gomaasapi.Subnet{gomaasapi.Subnet{DNSServers:[]string{"192.168.5.2"}, Name:"maas-eth5", Space:"bar", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.5.1", CIDR:"192.168.5.0/24", ResourceURI:"", ID:0x5, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}, gomaasapi.Subnet{DNSServers:[]string{"192.168.4.2"}, Name:"maas-eth4", Space:"bar", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.4.1", CIDR:"192.168.4.0/24", ResourceURI:"", ID:0x4, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}}, ResourceURI:"/api/1.0/spaces/2/", ID:0x2}, gomaasapi.Space{Name:"bam", Subnets:[]gomaasapi.Subnet{}, ResourceURI:"/api/1.0/spaces/3/", ID:0x3}}
... expected []gomaasapi.Space = []gomaasapi.Space{gomaasapi.Space{Name:"foo", Subnets:[]gomaasapi.Subnet{gomaasapi.Subnet{DNSServers:[]string{"192.168.1.2"}, Name:"maas-eth1", Space:"foo", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.1.1", CIDR:"192.168.1.0/24", ResourceURI:"", ID:0x1, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}, gomaasapi.Subnet{DNSServers:[]string{"192.168.2.2"}, Name:"maas-eth2", Space:"foo", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.2.1", CIDR:"192.168.2.0/24", ResourceURI:"", ID:0x2, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}, gomaasapi.Subnet{DNSServers:[]string{"192.168.3.2"}, Name:"maas-eth3", Space:"foo", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.3.1", CIDR:"192.168.3.0/24", ResourceURI:"", ID:0x3, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}}, ResourceURI:"/api/1.0/spaces/1/", ID:0x1}, gomaasapi.Space{Name:"bar", Subnets:[]gomaasapi.Subnet{gomaasapi.Subnet{DNSServers:[]string{"192.168.4.2"}, Name:"maas-eth4", Space:"bar", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.4.1", CIDR:"192.168.4.0/24", ResourceURI:"", ID:0x4, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}, gomaasapi.Subnet{DNSServers:[]string{"192.168.5.2"}, Name:"maas-eth5", Space:"bar", VLAN:gomaasapi.VLAN{Name:"", Fabric:"", VID:0x0, ResourceURI:"", ID:0x0}, GatewayIP:"192.168.5.1", CIDR:"192.168.5.0/24", ResourceURI:"", ID:0x5, InUseIPAddresses:[]gomaasapi.IP(nil), FixedAddressRanges:[]gomaasapi.AddressRange(nil)}}, ResourceURI:"/api/1.0/spaces/2/", ID:0x2}, gomaasapi.Space{Name:"bam", Subnets:[]gomaasapi.Subnet{}, ResourceURI:"/api/1.0/spaces/3/", ID:0x3}}
OOPS: 160 passed, 1 FAILED
--- FAIL: Test (0.12s)
FAIL
FAIL _/home/aim/gomaasapi 0.123s
? _/home/aim/gomaasapi/example [no test files]
testing: warning: no tests to run
PASS
ok _/home/aim/gomaasapi/templates 0.001s
Makefile:3: recipe for target 'check' failed
make: *** [check] Error 1
aim@spicy:~/gomaasapi (subnets-not-nil) (maas19-home)