コード例 #1
0
ファイル: workertest_test.go プロジェクト: exekias/juju
func (s *Suite) CheckFailed(c *gc.C) {
	if c.Failed() {
		c.Succeed()
	} else {
		c.Errorf("expected failure; none observed")
	}
	c.Logf("-------------------------------")
}
コード例 #2
0
ファイル: firewaller_test.go プロジェクト: Pankov404/juju
// 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)
	}
}
コード例 #3
0
ファイル: runner_test.go プロジェクト: pombredanne/snappy-1
func (m *GenericTestSuite) TestSuccess(c *check.C) {
	c.Succeed()
}