示例#1
0
文件: rkt_caps_test.go 项目: nak3/rkt
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()
	}
}