verifyimages

package
v1.7.0-rc3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VerifyImagesTests = []struct {
	//TestName - Name of the Test
	TestName string
	// PolicyName - Name of the Policy
	PolicyName string
	// PolicyRaw - The Yaml file of the ClusterPolicy
	PolicyRaw []byte
	// ResourceName - Name of the Resource
	ResourceName string
	// ResourceNamespace - Namespace of the Resource
	ResourceNamespace string
	// ResourceGVR - GVR of the Resource
	ResourceGVR schema.GroupVersionResource
	// ResourceRaw - The Yaml file of the ClusterPolicy
	ResourceRaw []byte
	// MustSucceed - indicates if validation must succeed
	MustSucceed bool
}{
	{

		TestName:          "checks that custom images are populated with simple extractor",
		PolicyName:        "tasks-simple",
		PolicyRaw:         kyvernoTaskPolicyWithSimpleExtractor,
		ResourceName:      "example-task-name",
		ResourceNamespace: "test-verify-images",
		ResourceGVR:       taskGVR,
		ResourceRaw:       tektonTask,
		MustSucceed:       false,
	},
	{

		TestName:          "checks that custom images are populated with complex extractor",
		PolicyName:        "tasks-complex",
		PolicyRaw:         kyvernoTaskPolicyWithComplexExtractor,
		ResourceName:      "example-task-name",
		ResourceNamespace: "test-verify-images",
		ResourceGVR:       taskGVR,
		ResourceRaw:       tektonTask,
		MustSucceed:       false,
	},
	{

		TestName:          "checks that custom images are not populated",
		PolicyName:        "tasks-no-extractor",
		PolicyRaw:         kyvernoTaskPolicyWithoutExtractor,
		ResourceName:      "example-task-name",
		ResourceNamespace: "test-verify-images",
		ResourceGVR:       taskGVR,
		ResourceRaw:       tektonTask,
		MustSucceed:       true,
	},
	{

		TestName:          "checks that custom images are populated and verified",
		PolicyName:        "tasks-keyless",
		PolicyRaw:         kyvernoTaskPolicyKeyless,
		ResourceName:      "example-task-name",
		ResourceNamespace: "test-verify-images",
		ResourceGVR:       taskGVR,
		ResourceRaw:       tektonTaskVerified,
		MustSucceed:       true,
	},
	{

		TestName:          "checks that custom images are populated and verified for all images",
		PolicyName:        "tasks-keyless-required",
		PolicyRaw:         kyvernoTaskPolicyKeylessRequired,
		ResourceName:      "example-task-name",
		ResourceNamespace: "test-verify-images",
		ResourceGVR:       taskGVR,
		ResourceRaw:       tektonTaskVerified,
		MustSucceed:       true,
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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