~tf4/goose/networking-prototype

« back to all changes in this revision

Viewing changes to testservices/novaservice/service_http_test.go

[r=wallyworld] The nova service test double was incorrectly ignoring the default security group when starting an instance. It assumed that the default group did not need to be in the list of groups specified when starting, but this is not the case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
666
666
        s.service.removeServer(srv.Id)
667
667
        req.Server.Name = "test2"
668
668
        req.Server.SecurityGroups = []map[string]string{
 
669
                {"name": "default"},
669
670
                {"name": "group1"},
670
671
                {"name": "group2"},
671
672
        }
686
687
        c.Assert(ok, Equals, true)
687
688
        ok = s.service.hasServerSecurityGroup(srv.Id, "2")
688
689
        c.Assert(ok, Equals, true)
 
690
        ok = s.service.hasServerSecurityGroup(srv.Id, "999")
 
691
        c.Assert(ok, Equals, true)
689
692
        s.service.removeServerSecurityGroup(srv.Id, "1")
690
693
        s.service.removeServerSecurityGroup(srv.Id, "2")
 
694
        s.service.removeServerSecurityGroup(srv.Id, "999")
691
695
        s.service.removeServer(srv.Id)
692
696
}
693
697