utils

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

utils

-- import "github.com/IBM/portieris/test/e2e/utils"

Usage

func CheckIfTesting
func CheckIfTesting(t *testing.T, boolToCheck bool)
func CleanUpClusterImagePolicyTest
func CleanUpClusterImagePolicyTest(t *testing.T, fw *framework.Framework, clusterPolicy, namespace string)
func CleanUpImagePolicyTest
func CleanUpImagePolicyTest(t *testing.T, fw *framework.Framework, namespace string)
func CreateClusterImagePolicyAndNamespace
func CreateClusterImagePolicyAndNamespace(t *testing.T, fw *framework.Framework, manifestPath string) (*v1beta1.ClusterImagePolicy, *corev1.Namespace)
func CreateImagePolicyInstalledNamespace
func CreateImagePolicyInstalledNamespace(t *testing.T, fw *framework.Framework, manifestPath string) *corev1.Namespace
func CreateSecret
func CreateSecret(t *testing.T, fw *framework.Framework, manifestPath, namespace string)
func DeleteThenReturnClusterImagePolicy
func DeleteThenReturnClusterImagePolicy(t *testing.T, fw *framework.Framework, clusterImagePolicy string) *v1beta1.ClusterImagePolicy

DeleteThenReturnClusterImagePolicy is used for temporary deletion of a cluster image policy for a given test The returned ClusterImagePolicy should be used to recreate after the test is complete using a defer

func DumpEvents
func DumpEvents(t *testing.T, fw *framework.Framework, namespace string)
func DumpPolicies
func DumpPolicies(t *testing.T, fw *framework.Framework, namespace string)
func KillPod
func KillPod(t *testing.T, fw *framework.Framework, namespace string)

KillPod kills first pod return in podlist in the given namespace

func TestCronJobNotRunnable
func TestCronJobNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestCronJobNotRunnable tests whether a manifest is deployable to the specified namespace

func TestCronJobRunnable
func TestCronJobRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestCronJobRunnable tests whether a manifest is deployable to the specified namespace

func TestCurrentDeployStatus
func TestCurrentDeployStatus(t *testing.T, fw *framework.Framework, namespace, deploymentName string)

TestCurrentDeployStatus checks the deployment currently has the expected number of replicas

func TestDaemonSetNotRunnable
func TestDaemonSetNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDaemonSetNotRunnable tests whether a manifest is deployable to the specified namespace

func TestDaemonSetRunnable
func TestDaemonSetRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDaemonSetRunnable tests whether a manifest is deployable to the specified namespace

func TestDeploymentNotRunnable
func TestDeploymentNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDeploymentNotRunnable tests whether a manifest is deployable to the specified namespace

func TestDeploymentNotRunnableOnPatch
func TestDeploymentNotRunnableOnPatch(t *testing.T, fw *framework.Framework, deploymentName, patchString, namespace string)

TestDeploymentNotRunnableOnPatch tests whether a deplomyent is not runnable after a patch

func TestDeploymentNotRunnableOnReplace
func TestDeploymentNotRunnableOnReplace(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDeploymentNotRunnableOnReplace tests whether a deplomyent is not runnable after a replace

func TestDeploymentRunnable
func TestDeploymentRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDeploymentRunnable tests whether a manifest is deployable to the specified namespace

func TestJobNotRunnable
func TestJobNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestJobNotRunnable tests whether a manifest is deployable to the specified namespace

func TestJobRunnable
func TestJobRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestJobRunnable tests whether a manifest is deployable to the specified namespace

func TestPodNotRunnable
func TestPodNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestPodNotRunnable tests whether a manifest is deployable to the specified namespace

func TestPodRunnable
func TestPodRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestPodRunnable tests whether a manifest is deployable to the specified namespace

func TestReplicaSetNotRunnable
func TestReplicaSetNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestReplicaSetNotRunnable tests whether a manifest is deployable to the specified namespace

func TestReplicaSetRunnable
func TestReplicaSetRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestReplicaSetRunnable tests whether a manifest is deployable to the specified namespace

func TestReplicationControllerNotRunnable
func TestReplicationControllerNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestReplicationControllerNotRunnable tests whether a manifest is deployable to the specified namespace

func TestReplicationControllerRunnable
func TestReplicationControllerRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestReplicationControllerRunnable tests whether a manifest is deployable to the specified namespace

func TestStartDeployNoDelete
func TestStartDeployNoDelete(t *testing.T, fw *framework.Framework, manifestLocation, namespace string) (deploymentName string)

TestStartDeployNoDelete starts a deployment and only deletes on failure

func TestStatefulSetNotRunnable
func TestStatefulSetNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestStatefulSetNotRunnable tests whether a manifest is deployable to the specified namespace

func TestStatefulSetRunnable
func TestStatefulSetRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestStatefulSetRunnable tests whether a manifest is deployable to the specified namespace

func UpdateImagePolicy
func UpdateImagePolicy(t *testing.T, fw *framework.Framework, manifestPath, namespace, oldPolicy string)

Documentation

Index

Constants

View Source
const (
	// NoCheck The image content isn't checked.
	NoCheck = iota
	// VerifySha The image content isn't checked.
	VerifySha
	// VerifyNoSha The image content isn't checked.
	VerifyNoSha
)

Variables

This section is empty.

Functions

func CheckIfTesting

func CheckIfTesting(t *testing.T, boolToCheck bool)

func CleanUpClusterImagePolicyTest

func CleanUpClusterImagePolicyTest(t *testing.T, fw *framework.Framework, clusterPolicy, namespace string)

func CleanUpImagePolicyTest

func CleanUpImagePolicyTest(t *testing.T, fw *framework.Framework, namespace string)

CleanUpImagePolicyTest ...

func CreateClusterImagePolicyAndNamespace

func CreateClusterImagePolicyAndNamespace(t *testing.T, fw *framework.Framework, manifestPath string) (*policyv1.ClusterImagePolicy, *corev1.Namespace)

func CreateImagePolicyInstalledNamespace

func CreateImagePolicyInstalledNamespace(t *testing.T, fw *framework.Framework, manifestPath string, ns string) *corev1.Namespace

CreateImagePolicyInstalledNamespace ...

func CreateImagePolicyInstalledNamespaceNoSecrets added in v0.10.0

func CreateImagePolicyInstalledNamespaceNoSecrets(t *testing.T, fw *framework.Framework, manifestPath string) *corev1.Namespace

CreateImagePolicyInstalledNamespaceNoSecrets ...

func CreateImagePolicyInstalledNamespaceOptionalSecrets added in v0.10.0

func CreateImagePolicyInstalledNamespaceOptionalSecrets(t *testing.T, fw *framework.Framework, manifestPath string, ips bool, namespaceParam string) *corev1.Namespace

CreateImagePolicyInstalledNamespaceOptionalSecrets ...

func CreateSecret

func CreateSecret(t *testing.T, fw *framework.Framework, manifestPath, namespace string)

func DeleteThenReturnClusterImagePolicy

func DeleteThenReturnClusterImagePolicy(t *testing.T, fw *framework.Framework, clusterImagePolicy string) *policyv1.ClusterImagePolicy

DeleteThenReturnClusterImagePolicy is used for the temporary deletion of a cluster image policy for a given test. The returned ClusterImagePolicy must be used to re-create the cluster image policy after the test is complete by using a defer.

func DumpEvents

func DumpEvents(t *testing.T, fw *framework.Framework, namespace string)

func DumpPolicies

func DumpPolicies(t *testing.T, fw *framework.Framework, namespace string)

func KillPod

func KillPod(t *testing.T, fw *framework.Framework, namespace string)

KillPod stops the first pod that is returned in the pod list in the specified namespace.

func TestCronJobNotRunnable

func TestCronJobNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestCronJobNotRunnable tests whether a manifest is deployable to the specified namespace.

func TestCronJobRunnable

func TestCronJobRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestCronJobRunnable tests whether a manifest is deployable to the specified namespace.

func TestCurrentDeployStatus

func TestCurrentDeployStatus(t *testing.T, fw *framework.Framework, namespace, deploymentName string)

TestCurrentDeployStatus checks that the deployment has the expected number of replicas.

func TestDaemonSetNotRunnable

func TestDaemonSetNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDaemonSetNotRunnable tests whether a manifest is deployable to the specified namespace.

func TestDaemonSetRunnable

func TestDaemonSetRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDaemonSetRunnable tests whether a manifest is deployable to the specified namespace.

func TestDeploymentNotRunnable

func TestDeploymentNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDeploymentNotRunnable tests whether a manifest is deployable to the specified namespace.

func TestDeploymentNotRunnableOnPatch

func TestDeploymentNotRunnableOnPatch(t *testing.T, fw *framework.Framework, deploymentName, patchString, namespace string)

TestDeploymentNotRunnableOnPatch tests whether a deployment is runnable after a patch.

func TestDeploymentNotRunnableOnReplace

func TestDeploymentNotRunnableOnReplace(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDeploymentNotRunnableOnReplace tests whether a deployment is runnable after a replace.

func TestDeploymentRunnable

func TestDeploymentRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestDeploymentRunnable tests whether a manifest is deployable to the specified namespace.

func TestDeploymentRunnableCheck added in v0.10.1

func TestDeploymentRunnableCheck(t *testing.T, fw *framework.Framework, manifestLocation, namespace string, sCheck ShaCheck)

TestDeploymentRunnableCheck tests whether a manifest is deployable to the specified namespace.

func TestJobNotRunnable

func TestJobNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestJobNotRunnable tests whether a manifest is deployable to the specified namespace.

func TestJobRunnable

func TestJobRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestJobRunnable tests whether a manifest is deployable to the specified namespace.

func TestPodNotRunnable

func TestPodNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestPodNotRunnable tests whether a manifest is deployable to the specified namespace.

func TestPodRunnable

func TestPodRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestPodRunnable tests whether a manifest is deployable to the specified namespace.

func TestReplicaSetNotRunnable

func TestReplicaSetNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestReplicaSetNotRunnable tests whether a manifest is deployable to the specified namespace.

func TestReplicaSetRunnable

func TestReplicaSetRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestReplicaSetRunnable tests whether a manifest is deployable to the specified namespace.

func TestReplicationControllerNotRunnable

func TestReplicationControllerNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestReplicationControllerNotRunnable tests whether a manifest is deployable to the specified namespace.

func TestReplicationControllerRunnable

func TestReplicationControllerRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestReplicationControllerRunnable tests whether a manifest is deployable to the specified namespace.

func TestStartDeployNoDelete

func TestStartDeployNoDelete(t *testing.T, fw *framework.Framework, manifestLocation, namespace string) (deploymentName string)

TestStartDeployNoDelete starts a deployment and deletes only on failure.

func TestStatefulSetNotRunnable

func TestStatefulSetNotRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestStatefulSetNotRunnable tests whether a manifest is deployable to the specified namespace.

func TestStatefulSetRunnable

func TestStatefulSetRunnable(t *testing.T, fw *framework.Framework, manifestLocation, namespace string)

TestStatefulSetRunnable tests whether a manifest is deployable to the specified namespace.

func UpdateImagePolicy

func UpdateImagePolicy(t *testing.T, fw *framework.Framework, manifestPath, namespace, oldPolicy string)

UpdateImagePolicy ...

Types

type ShaCheck added in v0.10.1

type ShaCheck int

ShaCheck indicates whether to check the image for sha256 content.

Jump to

Keyboard shortcuts

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