~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/gopkg.in/goose.v1/testservices/novaservice/setup_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package novaservice
 
2
 
 
3
import (
 
4
        "testing"
 
5
 
 
6
        gc "gopkg.in/check.v1"
 
7
 
 
8
        "gopkg.in/goose.v1/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
}