gopkg.in/goose.v2@v2.0.1/testservices/novaservice/setup_test.go (about)

     1  package novaservice
     2  
     3  import (
     4  	"testing"
     5  
     6  	gc "gopkg.in/check.v1"
     7  
     8  	"gopkg.in/goose.v2/nova"
     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 []nova.SecurityGroup, groupList []nova.SecurityGroup) {
    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  }