当前位置: 首页>>代码示例>>Golang>>正文


Golang v1.Suite函数代码示例

本文整理汇总了Golang中gopkg/in/check/v1.Suite函数的典型用法代码示例。如果您正苦于以下问题:Golang Suite函数的具体用法?Golang Suite怎么用?Golang Suite使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Suite函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: init

func init() {
	check.Suite(&SimpleSuite{})
	check.Suite(&FileSuite{})
	check.Suite(&DockerSuite{})
	check.Suite(&ConsulSuite{})
	check.Suite(&MarathonSuite{})
}
开发者ID:rasata,项目名称:traefik,代码行数:7,代码来源:integration_test.go

示例2: registerLocalTests

func registerLocalTests() {
	// N.B. Make sure the region we use here
	// has entries in the images/query txt files.
	aws.Regions["test"] = aws.Region{
		Name: "test",
	}

	gc.Suite(&localServerSuite{})
	gc.Suite(&localLiveSuite{})
	gc.Suite(&localNonUSEastSuite{})
}
开发者ID:claudiu-coblis,项目名称:juju,代码行数:11,代码来源:local_test.go

示例3: init

func init() {
	gc.Suite(&liveSuite{
		LiveTests: jujutest.LiveTests{
			TestConfig:     dummy.SampleConfig(),
			CanOpenState:   true,
			HasProvisioner: false,
		},
	})
	gc.Suite(&suite{
		Tests: jujutest.Tests{
			TestConfig: dummy.SampleConfig(),
		},
	})
}
开发者ID:imoapps,项目名称:juju,代码行数:14,代码来源:environs_test.go

示例4: registerAmazonTests

func registerAmazonTests() {
	// The following attributes hold the environment configuration
	// for running the amazon EC2 integration tests.
	//
	// This is missing keys for security reasons; set the following
	// environment variables to make the Amazon testing work:
	//  access-key: $AWS_ACCESS_KEY_ID
	//  secret-key: $AWS_SECRET_ACCESS_KEY
	attrs := coretesting.FakeConfig().Merge(map[string]interface{}{
		"name":           "sample-" + uniqueName,
		"type":           "ec2",
		"control-bucket": "juju-test-" + uniqueName,
		"admin-secret":   "for real",
		"firewall-mode":  config.FwInstance,
		"agent-version":  coretesting.FakeVersionNumber.String(),
	})
	gc.Suite(&LiveTests{
		LiveTests: jujutest.LiveTests{
			TestConfig:     attrs,
			Attempt:        *ec2.ShortAttempt,
			CanOpenState:   true,
			HasProvisioner: true,
		},
	})
}
开发者ID:andrewdmcleod,项目名称:juju,代码行数:25,代码来源:live_test.go

示例5: RegisterSuite

// RegisterSuite registers a new suite for a provided box
func RegisterSuite(boxConstructor BoxConstructor, opts isolate.Profile, skipCheck SkipCheck) {
	check.Suite(&BoxSuite{
		Constructor: boxConstructor,
		SkipCheck:   skipCheck,
		opts:        opts,
		ctx:         context.Background(),
	})
}
开发者ID:noxiouz,项目名称:stout,代码行数:9,代码来源:boxsuite.go

示例6: registerLiveSimpleStreamsTests

func registerLiveSimpleStreamsTests(baseURL string, validImageConstraint simplestreams.LookupConstraint, requireSigned bool) {
	gc.Suite(&sstesting.LocalLiveSimplestreamsSuite{
		Source:          simplestreams.NewURLDataSource("test", baseURL, utils.VerifySSLHostnames, simplestreams.DEFAULT_CLOUD_DATA, requireSigned),
		RequireSigned:   requireSigned,
		DataType:        imagemetadata.ImageIds,
		ValidConstraint: validImageConstraint,
	})
}
开发者ID:bac,项目名称:juju,代码行数:8,代码来源:simplestreams_test.go

示例7: init

func init() {
	check.Suite(&SimpleSuite{})
	check.Suite(&HTTPSSuite{})
	check.Suite(&FileSuite{})
	check.Suite(&DockerSuite{})
	check.Suite(&ConsulSuite{})
	check.Suite(&ConsulCatalogSuite{})
	check.Suite(&EtcdSuite{})
	check.Suite(&MarathonSuite{})
}
开发者ID:tayzlor,项目名称:traefik,代码行数:10,代码来源:integration_test.go

示例8: registerLiveSimpleStreamsTests

func registerLiveSimpleStreamsTests(baseURL string, validToolsConstraint simplestreams.LookupConstraint, requireSigned bool) {
	gc.Suite(&sstesting.LocalLiveSimplestreamsSuite{
		Source:          simplestreams.NewURLDataSource("test", baseURL, utils.VerifySSLHostnames, simplestreams.DEFAULT_CLOUD_DATA, requireSigned),
		RequireSigned:   requireSigned,
		DataType:        tools.ContentDownload,
		StreamsVersion:  tools.CurrentStreamsVersion,
		ValidConstraint: validToolsConstraint,
	})
}
开发者ID:AlexisBruemmer,项目名称:juju,代码行数:9,代码来源:simplestreams_test.go

示例9: registerSimpleStreamsTests

func registerSimpleStreamsTests() {
	gc.Suite(&simplestreamsSuite{
		LocalLiveSimplestreamsSuite: sstesting.LocalLiveSimplestreamsSuite{
			Source: simplestreams.NewURLDataSource(
				"test roundtripper", "test:", utils.VerifySSLHostnames, simplestreams.DEFAULT_CLOUD_DATA, false),
			RequireSigned:  false,
			DataType:       imagemetadata.ImageIds,
			StreamsVersion: imagemetadata.CurrentStreamsVersion,
			ValidConstraint: imagemetadata.NewImageConstraint(simplestreams.LookupParams{
				CloudSpec: simplestreams.CloudSpec{
					Region:   "us-east-1",
					Endpoint: "https://ec2.us-east-1.amazonaws.com",
				},
				Series: []string{"precise"},
				Arches: []string{"amd64", "arm"},
			}),
		},
	})
	gc.Suite(&signedSuite{})
}
开发者ID:bac,项目名称:juju,代码行数:20,代码来源:simplestreams_test.go

示例10: registerSimpleStreamsTests

func registerSimpleStreamsTests() {
	gc.Suite(&simplestreamsSuite{
		LocalLiveSimplestreamsSuite: sstesting.LocalLiveSimplestreamsSuite{
			Source:         simplestreams.NewURLDataSource("test", "test:", utils.VerifySSLHostnames, simplestreams.DEFAULT_CLOUD_DATA, false),
			RequireSigned:  false,
			DataType:       tools.ContentDownload,
			StreamsVersion: tools.CurrentStreamsVersion,
			ValidConstraint: tools.NewVersionedToolsConstraint(version.MustParse("1.13.0"), simplestreams.LookupParams{
				CloudSpec: simplestreams.CloudSpec{
					Region:   "us-east-1",
					Endpoint: "https://ec2.us-east-1.amazonaws.com",
				},
				Series: []string{"precise"},
				Arches: []string{"amd64", "arm"},
				Stream: "released",
			}),
		},
	})
	gc.Suite(&signedSuite{})
}
开发者ID:AlexisBruemmer,项目名称:juju,代码行数:20,代码来源:simplestreams_test.go

示例11: registerLiveTests

// Register tests to run against a real Openstack instance.
func registerLiveTests(cred *identity.Credentials) {
	config := makeTestConfig(cred)
	gc.Suite(&LiveTests{
		cred: cred,
		LiveTests: jujutest.LiveTests{
			TestConfig:     config,
			Attempt:        *openstack.ShortAttempt,
			CanOpenState:   true,
			HasProvisioner: true,
		},
	})
}
开发者ID:exekias,项目名称:juju,代码行数:13,代码来源:live_test.go

示例12: init

func init() {

	flag.Parse()

	if *runFeatureTests == false {
		return
	}
	// Initialize all suites here.
	gc.Suite(&cmdJujuSuite{})
	gc.Suite(&leadershipSuite{})
	gc.Suite(&uniterLeadershipSuite{})
	gc.Suite(&annotationsSuite{})
	gc.Suite(&apiEnvironmentSuite{})
	gc.Suite(&blockSuite{})
	gc.Suite(&apiCharmsSuite{})
	gc.Suite(&cmdEnvironmentSuite{})
	gc.Suite(&cmdStorageSuite{})
}
开发者ID:Pankov404,项目名称:juju,代码行数:18,代码来源:package_test.go

示例13: registerSimpleStreamsTests

func registerSimpleStreamsTests() {
	gc.Suite(&simplestreamsSuite{
		LocalLiveSimplestreamsSuite: sstesting.LocalLiveSimplestreamsSuite{
			Source:         simplestreams.NewURLDataSource("test", "test:", utils.VerifySSLHostnames),
			RequireSigned:  false,
			DataType:       "image-ids",
			StreamsVersion: "v1",
			ValidConstraint: sstesting.NewTestConstraint(simplestreams.LookupParams{
				CloudSpec: simplestreams.CloudSpec{
					Region:   "us-east-1",
					Endpoint: "https://ec2.us-east-1.amazonaws.com",
				},
				Series: []string{"precise"},
				Arches: []string{"amd64", "arm"},
			}),
		},
	})
}
开发者ID:Pankov404,项目名称:juju,代码行数:18,代码来源:simplestreams_test.go

示例14: SetUpSuite

	"github.com/juju/juju/cloudconfig/instancecfg"
	"github.com/juju/juju/constraints"
	"github.com/juju/juju/environs"
	"github.com/juju/juju/environs/imagemetadata"
	"github.com/juju/juju/instance"
	"github.com/juju/juju/testing"
	"github.com/juju/juju/tools"
	"github.com/juju/juju/version"
)

type clientSuite struct {
	testing.BaseSuite
}

var _ = gc.Suite(&clientSuite{})

func (s *clientSuite) SetUpSuite(c *gc.C) {
	s.BaseSuite.SetUpSuite(c)
	mock.Start()
}

func (s *clientSuite) TearDownSuite(c *gc.C) {
	mock.Stop()
	s.BaseSuite.TearDownSuite(c)
}

func (s *clientSuite) SetUpTest(c *gc.C) {
	s.BaseSuite.SetUpTest(c)

	ll := logger.LogLevel()
开发者ID:pmatulis,项目名称:juju,代码行数:30,代码来源:client_test.go

示例15: TestInputs

	"fmt"
	"time"

	jc "github.com/juju/testing/checkers"
	gc "gopkg.in/check.v1"

	coretesting "github.com/juju/juju/testing"
	"github.com/juju/juju/worker"
	"github.com/juju/juju/worker/dependency"
)

type SelfSuite struct {
	engineFixture
}

var _ = gc.Suite(&SelfSuite{})

func (s *SelfSuite) TestInputs(c *gc.C) {
	manifold := dependency.SelfManifold(s.engine)
	c.Check(manifold.Inputs, gc.HasLen, 0)
}

func (s *SelfSuite) TestStart(c *gc.C) {
	manifold := dependency.SelfManifold(s.engine)
	engine, err := manifold.Start(nil)
	c.Check(err, jc.ErrorIsNil)
	c.Check(engine, gc.Equals, s.engine)
}

func (s *SelfSuite) TestOutputBadInput(c *gc.C) {
	manifold := dependency.SelfManifold(s.engine)
开发者ID:imoapps,项目名称:juju,代码行数:31,代码来源:self_test.go


注:本文中的gopkg/in/check/v1.Suite函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。