本文整理汇总了Golang中github.com/deis/deis/tests/utils.GetGlobalConfig函数的典型用法代码示例。如果您正苦于以下问题:Golang GetGlobalConfig函数的具体用法?Golang GetGlobalConfig怎么用?Golang GetGlobalConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetGlobalConfig函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: TestUsers
func TestUsers(t *testing.T) {
params := utils.GetGlobalConfig()
user := utils.GetGlobalConfig()
user.UserName, user.Password = "user-list-test", "test"
user.AppName = params.AppName
utils.Execute(t, authRegisterCmd, user, false, "")
usersListTest(t, params, user)
}
开发者ID:CodeJuan,项目名称:deis,代码行数:8,代码来源:users_test.go
示例2: authCancel
func authCancel(t *testing.T, params *utils.DeisTestConfig) {
utils.Execute(t, authCancelCmd, params, false, "Account cancelled")
user := utils.GetGlobalConfig()
// Admins can delete other users.
user.UserName, user.Password = "cancel-test", "test"
utils.Execute(t, authRegisterCmd, user, false, "")
admin := utils.GetGlobalConfig()
utils.Execute(t, authLoginCmd, admin, false, "")
utils.Execute(t, authCancelAdminCmd, user, false, "Account cancelled")
// Make sure the user's config was not purged after auth:cancel --username
utils.Execute(t, authWhoamiCmd, admin, false, "You are "+admin.UserName)
}
开发者ID:CodeJuan,项目名称:deis,代码行数:13,代码来源:auth_test.go
示例3: authCancel
func authCancel(t *testing.T, params *utils.DeisTestConfig) {
utils.Execute(t, authCancelCmd, params, false, "Account cancelled")
user := utils.GetGlobalConfig()
// Admins can delete other users.
user.UserName, user.Password = "cancel-test", "test"
utils.Execute(t, authRegisterCmd, user, false, "")
admin := utils.GetGlobalConfig()
utils.Execute(t, authLoginCmd, admin, false, "")
utils.Execute(t, authCancelAdminCmd, user, false, "Account cancelled")
// Make sure the admin is still logged in
utils.CheckList(t, authWhoamiCmd, admin, admin.UserName, false)
}
开发者ID:laurrentt,项目名称:deis,代码行数:13,代码来源:auth_test.go
示例4: appsSetup
func appsSetup(t *testing.T) *utils.DeisTestConfig {
cfg := utils.GetGlobalConfig()
cfg.AppName = "appssample"
utils.Execute(t, authLoginCmd, cfg, false, "")
utils.Execute(t, gitCloneCmd, cfg, false, "")
return cfg
}
开发者ID:gdestuynder,项目名称:deis,代码行数:7,代码来源:apps_test.go
示例5: TestSmokeExampleApp
// TestSmokeExampleApp updates a Vagrant instance to run Deis with docker
// containers using the current codebase, then registers a user, pushes an
// example app, and looks for "Powered by Deis" in the HTTP response.
func TestSmokeExampleApp(t *testing.T) {
cfg := utils.GetGlobalConfig()
for _, tt := range smokeTests {
runTest(t, &tt, cfg)
}
}
开发者ID:bdemers,项目名称:deis,代码行数:10,代码来源:smoke_test.go
示例6: configSetup
func configSetup(t *testing.T) *utils.DeisTestConfig {
cfg := utils.GetGlobalConfig()
cfg.AppName = "configsample"
utils.Execute(t, authLoginCmd, cfg, false, "")
utils.Execute(t, gitCloneCmd, cfg, false, "")
if err := utils.Chdir(cfg.ExampleApp); err != nil {
t.Fatal(err)
}
utils.Execute(t, appsCreateCmd, cfg, false, "")
// ensure envvars with spaces work fine on `git push`
// https://github.com/deis/deis/issues/2477
utils.Execute(t, configSet3Cmd, cfg, false, "the Deis team")
// ensure custom buildpack URLs are in order
url := buildpacks[cfg.ExampleApp]
if url == "" {
// set url anyway so example-dockerfile apps create a build
url = buildpacks["example-go"]
}
cmd := strings.Replace(configSetBuildpackCmd, "$BUILDPACK_URL", url, 1)
utils.Execute(t, cmd, cfg, false, url)
utils.Execute(t, gitPushCmd, cfg, false, "")
utils.CurlApp(t, *cfg)
utils.CheckList(t, "run env --app={{.AppName}}", cfg, "DEIS_APP", false)
utils.CheckList(t, "run env --app={{.AppName}}", cfg, "DEIS_RELEASE", false)
if err := utils.Chdir(".."); err != nil {
t.Fatal(err)
}
return cfg
}
开发者ID:gpxl,项目名称:deis,代码行数:29,代码来源:config_test.go
示例7: TestGlobal
func TestGlobal(t *testing.T) {
params := utils.GetGlobalConfig()
cookieTest(t, params)
utils.Execute(t, authRegisterCmd, params, false, "")
utils.Execute(t, keysAddCmd, params, false, "")
utils.Execute(t, clustersCreateCmd, params, false, "")
}
开发者ID:bdemers,项目名称:deis,代码行数:7,代码来源:integration_test.go
示例8: TestPerms
func TestPerms(t *testing.T) {
params := permsSetup(t)
user := utils.GetGlobalConfig()
user.UserName, user.Password = "test1", "test1"
user.AppName = params.AppName
utils.Execute(t, authRegisterCmd, user, false, "")
permsCreateAppTest(t, params, user)
permsDeleteAppTest(t, params, user)
permsCreateAdminTest(t, params)
permsDeleteAdminTest(t, params)
utils.AppsDestroyTest(t, params)
}
开发者ID:CodeJuan,项目名称:deis,代码行数:12,代码来源:perms_test.go
示例9: authRegenerateTest
func authRegenerateTest(t *testing.T) {
params := utils.GetGlobalConfig()
regenCmd := authRegenerateUsrCmd
loginCmd := authLoginCmd
utils.Execute(t, loginCmd, params, false, "")
utils.Execute(t, authRegenerateCmd, params, false, "")
utils.Execute(t, loginCmd, params, false, "")
utils.Execute(t, regenCmd, params, false, "")
utils.Execute(t, checkTokenCmd, params, true, "401 UNAUTHORIZED")
utils.Execute(t, loginCmd, params, false, "")
utils.Execute(t, authRegenerateAllCmd, params, false, "")
utils.Execute(t, checkTokenCmd, params, true, "401 UNAUTHORIZED")
}
开发者ID:CodeJuan,项目名称:deis,代码行数:14,代码来源:auth_test.go
示例10: appsTransferTest
func appsTransferTest(t *testing.T, params *utils.DeisTestConfig) {
user := utils.GetGlobalConfig()
user.UserName, user.Password = "app-transfer-test", "test"
user.AppName = "transfer-test"
user.NewOwner = params.UserName
utils.Execute(t, authRegisterCmd, user, false, "")
utils.Execute(t, authLoginCmd, user, false, "")
utils.Execute(t, appsCreateCmdNoRemote, user, false, "")
utils.Execute(t, appsTransferCmd, user, false, "")
utils.Execute(t, appsInfoCmd, user, true, "403 FORBIDDEN")
utils.Execute(t, authLoginCmd, params, false, "")
params.AppName = user.AppName
utils.CheckList(t, appsInfoCmd, params, params.UserName, false)
}
开发者ID:yun-an,项目名称:deis,代码行数:14,代码来源:apps_test.go
示例11: psSetup
func psSetup(t *testing.T) *utils.DeisTestConfig {
cfg := utils.GetGlobalConfig()
cfg.AppName = "pssample"
utils.Execute(t, authLoginCmd, cfg, false, "")
utils.Execute(t, gitCloneCmd, cfg, false, "")
if err := utils.Chdir(cfg.ExampleApp); err != nil {
t.Fatal(err)
}
utils.Execute(t, appsCreateCmd, cfg, false, "")
utils.Execute(t, gitPushCmd, cfg, false, "")
if err := utils.Chdir(".."); err != nil {
t.Fatal(err)
}
return cfg
}
开发者ID:ericcapricorn,项目名称:deis,代码行数:15,代码来源:ps_test.go
示例12: buildSetup
func buildSetup(t *testing.T) *utils.DeisTestConfig {
cfg := utils.GetGlobalConfig()
cfg.AppName = "buildsample"
utils.Execute(t, authLoginCmd, cfg, false, "")
utils.Execute(t, gitCloneCmd, cfg, false, "")
if err := utils.Chdir(cfg.ExampleApp); err != nil {
t.Fatal(err)
}
utils.Execute(t, appsCreateCmd, cfg, false, "")
utils.Execute(t, gitPushCmd, cfg, false, "")
utils.Execute(t, "git commit --allow-empty -m bump", cfg, false, "")
utils.Execute(t, gitPushCmd, cfg, false, "")
if err := utils.Chdir(".."); err != nil {
t.Fatal(err)
}
return cfg
}
开发者ID:ericcapricorn,项目名称:deis,代码行数:17,代码来源:builds_test.go
示例13: configSetup
func configSetup(t *testing.T) *utils.DeisTestConfig {
cfg := utils.GetGlobalConfig()
cfg.AppName = "configsample"
utils.Execute(t, authLoginCmd, cfg, false, "")
utils.Execute(t, gitCloneCmd, cfg, false, "")
if err := utils.Chdir(cfg.ExampleApp); err != nil {
t.Fatal(err)
}
utils.Execute(t, appsCreateCmd, cfg, false, "")
// ensure envvars with spaces work fine on `git push`
// https://github.com/deis/deis/issues/2477
utils.Execute(t, configSet3Cmd, cfg, false, "the Deis team")
utils.Execute(t, gitPushCmd, cfg, false, "")
utils.CurlWithFail(t, cfg, false, "the Deis team")
if err := utils.Chdir(".."); err != nil {
t.Fatal(err)
}
return cfg
}
开发者ID:gdestuynder,项目名称:deis,代码行数:19,代码来源:config_test.go
示例14: clustersSetup
func clustersSetup(t *testing.T) *utils.DeisTestConfig {
cfg := utils.GetGlobalConfig()
cfg.ClusterName = "devtest"
utils.Execute(t, authLoginCmd, cfg, false, "")
return cfg
}
开发者ID:bdemers,项目名称:deis,代码行数:6,代码来源:clusters_test.go
示例15: TestGlobal
func TestGlobal(t *testing.T) {
params := utils.GetGlobalConfig()
utils.Execute(t, authRegisterCmd, params, false, "")
clientTest(t, params)
utils.Execute(t, keysAddCmd, params, false, "")
}
开发者ID:CodeJuan,项目名称:deis,代码行数:6,代码来源:integration_test.go
示例16: keysSetup
// Requires a ~/.ssh/deis-testkey to be set up:
// $ ssh-keygen -q -t rsa -f ~/.ssh/deiskey -N '' -C deiskey
func keysSetup(t *testing.T) *utils.DeisTestConfig {
cfg := utils.GetGlobalConfig()
utils.Execute(t, authLoginCmd, cfg, false, "")
return cfg
}
开发者ID:CodeJuan,项目名称:deis,代码行数:7,代码来源:keys_test.go
示例17: authSetup
func authSetup(t *testing.T) *utils.DeisTestConfig {
user := utils.GetGlobalConfig()
user.UserName, user.Password = utils.NewID(), utils.NewID()
return user
}
开发者ID:CodeJuan,项目名称:deis,代码行数:5,代码来源:auth_test.go
注:本文中的github.com/deis/deis/tests/utils.GetGlobalConfig函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论