test

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const LOCAL_MODE = "local"
View Source
const MANIFEST_MODE = "manifest"
View Source
const SharedFixturesDir = "../../internal/test/fixtures"

SharedFixturesDir contains fixtures used by multiple tests

Variables

This section is empty.

Functions

func ApplyManifest added in v0.17.1

func ApplyManifest(t *testing.T, manifestPath, namespace string)

func AuditLocal

func AuditLocal(t *testing.T, fixtureDir, fixture string, auditable kubeaudit.Auditable, namespace string, expectedErrors []string) *kubeaudit.Report

func AuditManifest

func AuditManifest(t *testing.T, fixtureDir, fixture string, auditable kubeaudit.Auditable, expectedErrors []string) *kubeaudit.Report

func AuditMultiple

func AuditMultiple(t *testing.T, fixtureDir, fixture string, auditables []kubeaudit.Auditable, expectedErrors []string, namespace string, mode string) *kubeaudit.Report

func CreateNamespace added in v0.17.1

func CreateNamespace(t *testing.T, namespace string)

func DeleteNamespace added in v0.17.1

func DeleteNamespace(t *testing.T, namespace string)

func FixSetup

func FixSetup(t *testing.T, fixtureDir, fixture string, auditable kubeaudit.Auditable) (fixedResources []k8s.Resource, report *kubeaudit.Report)

func FixSetupMultiple

func FixSetupMultiple(t *testing.T, fixtureDir, fixture string, auditables []kubeaudit.Auditable) (fixedResources []k8s.Resource, report *kubeaudit.Report)

FixSetup runs Fix() on a given manifest and returns the resulting resources

func GetAllFileNames

func GetAllFileNames(t *testing.T, directory string) []string

GetAllFileNames returns all file names in the given directory It can be used to retrieve all of the resource manifests from the test/fixtures/all_resources directory This directory is not hardcoded because the working directory for tests is relative to the test

func GetReport

func GetReport(t *testing.T, fixtureDir, fixture string, auditables []kubeaudit.Auditable, namespace string, mode string) *kubeaudit.Report

func UseKind added in v0.17.1

func UseKind() bool

UseKind returns true if tests which utilize Kind should run

Types

This section is empty.

Jump to

Keyboard shortcuts

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