gopkg.in/goose.v2@v2.0.1/testservices/neutronservice/setup_test.go (about) 1 package neutronservice 2 3 import ( 4 "testing" 5 6 gc "gopkg.in/check.v1" 7 8 "gopkg.in/goose.v2/neutron" 9 ) 10 11 func Test(t *testing.T) { 12 gc.TestingT(t) 13 } 14 15 // checkGroupsInList checks that every group in groups is in groupList. 16 func checkGroupsInList(c *gc.C, groups, groupList []neutron.SecurityGroupV2) { 17 for _, g := range groups { 18 for _, gr := range groupList { 19 if g.Id == gr.Id { 20 c.Assert(g, gc.DeepEquals, gr) 21 return 22 } 23 } 24 c.Fail() 25 } 26 } 27 28 // checkPortsInList checks that every port in ports is in portList. 29 func checkPortsInList(c *gc.C, ports, portList []neutron.PortV2) { 30 for _, g := range ports { 31 for _, gr := range portList { 32 if g.Id == gr.Id { 33 c.Assert(g, gc.DeepEquals, gr) 34 return 35 } 36 } 37 c.Fail() 38 } 39 }