utils

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 16 Imported by: ? 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

This section is empty.

Variables

This section is empty.

Functions

func CheckLine

func CheckLine(t *testing.T, expec, want string, line int)

CheckLine executes assertions to validate the content of two JSON files

func Contains

func Contains(list []string, searchTerm string) bool

Contains returns if a string list contains an especific term

func FileCheck

func FileCheck(t *testing.T, expectedPayloadID, wantedPayloadID, location string)

FileCheck executes assertions to validate file content length

func GetKICSBinaryPath

func GetKICSBinaryPath(path string) []string

GetKICSBinaryPath gets the kics binary complete path

func HTMLValidation

func HTMLValidation(t *testing.T, file string)

HTMLValidation executes many asserts to validate the HTML Report

func JSONSchemaValidation

func JSONSchemaValidation(t *testing.T, file, schema string)

JSONSchemaValidation execute a schema validation of JSON reports

func PrepareExpected

func PrepareExpected(path, folder string) ([]string, error)

PrepareExpected prepares the files for validation tests

func ReadFixture

func ReadFixture(testName, folder string) (string, error)

ReadFixture reads a file based on a provided path and filename

Types

type CmdOutput

type CmdOutput struct {
	Output []string
	Status int
}

CmdOutput stores the structure of kics output

func RunCommand

func RunCommand(args []string) (*CmdOutput, error)

RunCommand executes the kics in a terminal

Jump to

Keyboard shortcuts

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