Documentation ¶
Overview ¶
Package redhat provides a tnf.Test implementation which tests whether a container is based on Red Hat technologies.
Index ¶
- Constants
- Variables
- type Release
- func (r *Release) Args() []string
- func (r *Release) GetIdentifier() identifier.Identifier
- func (r *Release) ReelEOF()
- func (r *Release) ReelFirst() *reel.Step
- func (r *Release) ReelMatch(pattern, _, _ string) *reel.Step
- func (r *Release) ReelTimeout() *reel.Step
- func (r *Release) Result() int
- func (r *Release) Timeout() time.Duration
Constants ¶
View Source
const ( // NotRedHatBasedRegex is the expected output for a container that is not based on Red Hat technologies. NotRedHatBasedRegex = `(?m)Unknown Base Image` // VersionRegex is regular expression expected for a container based on Red Hat technologies. VersionRegex = `(?m)Red Hat Enterprise Linux( Server)? release (\d+\.\d+) \(\w+\)` )
Variables ¶
View Source
var ( // ReleaseCommand is the Unix command used to check whether a container is based on Red Hat technologies. ReleaseCommand = fmt.Sprintf("if [ -e /etc/redhat-release ]; then %s /etc/redhat-release; else echo \"Unknown Base Image\"; fi", dependencies.CatBinaryName) )
Functions ¶
This section is empty.
Types ¶
type Release ¶
type Release struct {
// contains filtered or unexported fields
}
Release is an implementation of tnf.Test used to determine whether a container is based on Red Hat technologies.
func NewRelease ¶
NewRelease create a new Release tnf.Test.
func (*Release) GetIdentifier ¶
func (r *Release) GetIdentifier() identifier.Identifier
GetIdentifier returns the tnf.Test specific identifier.
func (*Release) ReelEOF ¶
func (r *Release) ReelEOF()
ReelEOF does nothing; no intervention is needed for EOF.
func (*Release) ReelFirst ¶
ReelFirst returns a reel.Step which expects output from running the Args command.
func (*Release) ReelMatch ¶
ReelMatch determines whether the container is based on Red Hat technologies through pattern matching logic.
func (*Release) ReelTimeout ¶
ReelTimeout does nothing; no intervention is needed for a timeout.
Click to show internal directories.
Click to hide internal directories.