本文整理匯總了Golang中github.com/coreos/rkt/tests/testutils.RktRunCtx.RunGC方法的典型用法代碼示例。如果您正苦於以下問題:Golang RktRunCtx.RunGC方法的具體用法?Golang RktRunCtx.RunGC怎麽用?Golang RktRunCtx.RunGC使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/coreos/rkt/tests/testutils.RktRunCtx
的用法示例。
在下文中一共展示了RktRunCtx.RunGC方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: capsSeveralAppsRunAndCheckOutput
func capsSeveralAppsRunAndCheckOutput(t *testing.T, ctx *testutils.RktRunCtx, cmd string) {
// Ideally, the test would run the pod only one time, but all
// apps' output is mixed together without ordering guarantees, so
// it makes it impossible to call all the expectWithOutput() in
// the correct order.
for _, tt := range appCapsTests {
t.Logf("Checking caps for %q", tt.testName)
child := spawnOrFail(t, cmd)
expected := fmt.Sprintf("Capability set: bounding: %s (%s)",
tt.expected, tt.testName)
if err := expectWithOutput(child, expected); err != nil {
t.Fatalf("Expected %q but not found: %v", expected, err)
}
waitOrFail(t, child, 0)
ctx.RunGC()
}
}