type execCommand … // ExecCommand returns the command to execute in the container that implements // execCommand and logs activities to a container specific log that persists // across container restarts. The final log is written to container log so it // can be retrieved by the test harness during the container execution. // Log to /proc/1/fd/1 so that the lifecycle hook handler logs are captured as // well. func ExecCommand(name string, c execCommand) []string { … } // sleepCommand returns a command that sleeps for the given number of seconds // in background and waits for it to finish so that the parent process can // handle signals. func sleepCommand(seconds int) string { … } type containerOutput … type containerOutputList … func (o containerOutputList) String() string { … } // RunTogether returns an error if containers don't run together func (o containerOutputList) RunTogether(lhs, rhs string) error { … } // RunTogetherLhsFirst returns an error if containers don't run together or if rhs starts before lhs func (o containerOutputList) RunTogetherLhsFirst(lhs, rhs string) error { … } // StartsBefore returns an error if lhs did not start before rhs func (o containerOutputList) StartsBefore(lhs, rhs string) error { … } // ExitsBefore returns an error if lhs did not end before rhs func (o containerOutputList) ExitsBefore(lhs, rhs string) error { … } // Starts returns an error if the container was not found to have started func (o containerOutputList) Starts(name string) error { … } // DoesntStart returns an error if the container was found to have started func (o containerOutputList) DoesntStart(name string) error { … } // Exits returns an error if the container was not found to have exited func (o containerOutputList) Exits(name string) error { … } // HasRestarted returns an error if the container was not found to have restarted func (o containerOutputList) HasRestarted(name string) error { … } // HasNotRestarted returns an error if the container was found to have restarted func (o containerOutputList) HasNotRestarted(name string) error { … } type containerOutputIndex … func (i containerOutputIndex) IsBefore(other containerOutputIndex) error { … } func (o containerOutputList) FindIndex(name string, command string, startIdx containerOutputIndex) (containerOutputIndex, error) { … } func (o containerOutputList) findIndex(name string, command string, startIdx int) int { … } func (o containerOutputList) findLastIndex(name string, command string) int { … } // TimeOfStart returns the UNIX time in milliseconds when the specified container started. func (o containerOutputList) TimeOfStart(name string) (int64, error) { … } // TimeOfLastLoop returns the UNIX time in milliseconds when the specified container last looped. func (o containerOutputList) TimeOfLastLoop(name string) (int64, error) { … } // parseOutput combines the container log from all of the init and regular // containers and parses/sorts the outputs to produce an execution log func parseOutput(ctx context.Context, f *framework.Framework, pod *v1.Pod) containerOutputList { … } // preparePod adds an empty dir volume and mounts it to each container at /persistent func preparePod(pod *v1.Pod) { … }