func (s *Suite) CheckFailed(c *gc.C) { if c.Failed() { c.Succeed() } else { c.Errorf("expected failure; none observed") } c.Logf("-------------------------------") }
// assertEnvironPorts retrieves the open ports of environment and compares them // to the expected. func (s *firewallerBaseSuite) assertEnvironPorts(c *gc.C, expected []network.PortRange) { s.BackingState.StartSync() start := time.Now() for { got, err := s.Environ.Ports() if err != nil { c.Fatal(err) return } network.SortPortRanges(got) network.SortPortRanges(expected) if reflect.DeepEqual(got, expected) { c.Succeed() return } if time.Since(start) > coretesting.LongWait { c.Fatalf("timed out: expected %q; got %q", expected, got) return } time.Sleep(coretesting.ShortWait) } }
func (m *GenericTestSuite) TestSuccess(c *check.C) { c.Succeed() }