本文整理汇总了Golang中github.com/maximilien/softlayer-go/test_helpers.WaitForVirtualGuestToHaveNoActiveTransactions函数的典型用法代码示例。如果您正苦于以下问题:Golang WaitForVirtualGuestToHaveNoActiveTransactions函数的具体用法?Golang WaitForVirtualGuestToHaveNoActiveTransactions怎么用?Golang WaitForVirtualGuestToHaveNoActiveTransactions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了WaitForVirtualGuestToHaveNoActiveTransactions函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: cleanUpTestResources
func cleanUpTestResources() {
virtualGuestIds, err := testhelpers.FindAndDeleteTestVirtualGuests()
Expect(err).ToNot(HaveOccurred())
for _, vgId := range virtualGuestIds {
testhelpers.WaitForVirtualGuestToHaveNoActiveTransactions(vgId)
}
err = testhelpers.FindAndDeleteTestSshKeys()
Expect(err).ToNot(HaveOccurred())
}
开发者ID:midoblgsm,项目名称:softlayer-go,代码行数:11,代码来源:virtual_guest_lifecycle_suite_test.go
示例2:
testhelpers.TIMEOUT = 35 * time.Minute
testhelpers.POLLING_INTERVAL = 10 * time.Second
})
Context("set_vm_metadata", func() {
BeforeEach(func() {
err = testhelpers.FindAndDeleteTestSshKeys()
Expect(err).ToNot(HaveOccurred())
createdSshKey, _ = testhelpers.CreateTestSshKey()
testhelpers.WaitForCreatedSshKeyToBePresent(createdSshKey.Id)
virtualGuest = testhelpers.CreateVirtualGuestAndMarkItTest([]datatypes.SoftLayer_Security_Ssh_Key{createdSshKey})
testhelpers.WaitForVirtualGuestToBeRunning(virtualGuest.Id)
testhelpers.WaitForVirtualGuestToHaveNoActiveTransactions(virtualGuest.Id)
pwd, err := os.Getwd()
Expect(err).ToNot(HaveOccurred())
rootTemplatePath = filepath.Join(pwd, "..", "..")
strVGID = strconv.Itoa(virtualGuest.Id)
replacementMap = map[string]string{
"ID": strVGID,
"DirectorUuid": "fake-director-uuid",
"Tag_compiling": "buildpack_python",
"Tag_deployment": "metadata_deployment",
}
})
开发者ID:digideskweb,项目名称:bosh-softlayer-cpi,代码行数:30,代码来源:set_vm_metadata_test.go
示例3:
os.Setenv("SQLITE_DB_FOLDER", "/tmp")
testhelpers.TIMEOUT = 35 * time.Minute
testhelpers.POLLING_INTERVAL = 10 * time.Second
pwd, err := os.Getwd()
Expect(err).ToNot(HaveOccurred())
rootTemplatePath = filepath.Join(pwd, "..", "..")
tmpConfigPath, err = testhelperscpi.CreateTmpConfigPath(rootTemplatePath, configPath, username, apiKey)
Expect(err).ToNot(HaveOccurred())
})
AfterEach(func() {
testhelpers.WaitForVirtualGuestToHaveNoActiveTransactions(int(vmId))
testhelpers.DeleteVirtualGuest(int(vmId))
err = os.RemoveAll(tmpConfigPath)
Expect(err).ToNot(HaveOccurred())
})
Context("True path of OS Reload", func() {
BeforeEach(func() {
os.Setenv("SQLITE_DB_FILE", "vm_pool.sqlite.right")
})
AfterEach(func() {
err = os.Remove("/tmp/vm_pool.sqlite.right")
开发者ID:jianqiu,项目名称:bosh-softlayer-cpi,代码行数:31,代码来源:os_reload_test.go
注:本文中的github.com/maximilien/softlayer-go/test_helpers.WaitForVirtualGuestToHaveNoActiveTransactions函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论