util

package
v0.0.0-...-a30af57 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// VersionPrefix is the string that every OSD version begins with.
	VersionPrefix = "openshift-v"
)

Variables

View Source
var NoVersionFound = "NoVersionFound"

NoVersionFound when no version can be found.

Functions

func OnSupportedVersionIt

func OnSupportedVersionIt(constraints *semver.Constraints, helper ClusterVersionProvider, description string, f func(context.Context))

OnSupportedVersionIt runs a ginkgo It() if and only if the cluster version meets the provided constraint. The cluster version is looked up using the provided helper.H.

func OpenshiftVersionToSemver

func OpenshiftVersionToSemver(openshiftVersion string) (*semver.Version, error)

OpenshiftVersionToSemver converts an OpenShift version to a semver string which can then be used for comparisons.

func RandomStr

func RandomStr(length int) (str string)

RandomStr returns a random varchar string given a specified length

func SemverToOpenshiftVersion

func SemverToOpenshiftVersion(version *semver.Version) string

SemverToOpenshiftVersion converts an OpenShift version to a semver string which can then be used for comparisons.

Types

type ClusterVersionProvider

type ClusterVersionProvider interface {
	GetClusterVersion(context.Context) (*v1.ClusterVersion, error)
}

ClusterVersionProvider is a type that can return cluster version information. The *helper.H type implements this interface.

Jump to

Keyboard shortcuts

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