redhat

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package redhat provides a tnf.Test implementation which tests whether a container is based on Red Hat technologies.

Index

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

func NewRelease(timeout time.Duration) *Release

NewRelease create a new Release tnf.Test.

func (*Release) Args

func (r *Release) Args() []string

Args returns the command line arguments for the 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

func (r *Release) ReelFirst() *reel.Step

ReelFirst returns a reel.Step which expects output from running the Args command.

func (*Release) ReelMatch

func (r *Release) ReelMatch(pattern, _, _ string) *reel.Step

ReelMatch determines whether the container is based on Red Hat technologies through pattern matching logic.

func (*Release) ReelTimeout

func (r *Release) ReelTimeout() *reel.Step

ReelTimeout does nothing; no intervention is needed for a timeout.

func (*Release) Result

func (r *Release) Result() int

Result returns the test result.

func (*Release) Timeout

func (r *Release) Timeout() time.Duration

Timeout returns the timeout for the test.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL