utils

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeWD

func ChangeWD(t *testing.T, newPath string) string

func ChangeWDWithCallback added in v1.12.4

func ChangeWDWithCallback(t *testing.T, newPath string) func()

func CleanFileSystem

func CleanFileSystem()

func CleanTestsHomeEnv

func CleanTestsHomeEnv()

func CreateSecurityPolicy added in v1.14.0

func CreateSecurityPolicy(t *testing.T, policyName string, rules ...xrayUtils.PolicyRule) (string, func())

func CreateTestIgnoreRules added in v1.14.0

func CreateTestIgnoreRules(t *testing.T, description string, filters xrayUtils.IgnoreFilters) func()

func CreateTestPolicyAndWatch added in v1.14.0

func CreateTestPolicyAndWatch(t *testing.T, policyName, watchName string, severity xrayUtils.Severity) (string, func())

func CreateTestProjectEnvAndChdir added in v1.12.4

func CreateTestProjectEnvAndChdir(t *testing.T, projectPath string) (string, func())

func CreateTestProjectInTempDir added in v1.12.4

func CreateTestProjectInTempDir(t *testing.T, projectPath string) (string, func())

func CreateTestProjectKeyWatch added in v1.14.0

func CreateTestProjectKeyWatch(t *testing.T, policyName, watchName, projectKey string, gitResources ...string) (string, func())

func CreateTestSecurityPolicy added in v1.14.0

func CreateTestSecurityPolicy(t *testing.T, policyName string, severity xrayUtils.Severity, failBuild bool, skipNotApplicable bool) (string, func())

func CreateWatchForTests added in v1.14.0

func CreateWatchForTests(t *testing.T, policyName, watchName string, gitResources ...string) (string, func())

If gitResources is empty, the watch will be created with all builds.

func GetTestsXrayVersion added in v1.13.2

func GetTestsXrayVersion() (version.Version, error)

func ReadSarifResults added in v1.12.0

func ReadSarifResults(t *testing.T, path string) *sarif.Report

func ReadSimpleJsonResults added in v1.12.0

func ReadSimpleJsonResults(t *testing.T, path string) formats.SimpleJsonResults

func ReadSummaryResults added in v1.12.0

func ReadSummaryResults(t *testing.T, path string) formats.ResultsSummary

func UnmarshalJson added in v1.6.0

func UnmarshalJson(t *testing.T, output string) formats.EnrichJson

func UnmarshalXML added in v1.6.0

func UnmarshalXML(t *testing.T, output string) formats.Bom

func ValidateXrayVersion

func ValidateXrayVersion(t *testing.T, minVersion string)

func ValidateXscVersion added in v1.1.0

func ValidateXscVersion(t *testing.T, xscVersion, minVersion string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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