test

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenDuplicatePackages

func GenDuplicatePackages(n int) ([]*claircore.Package, error)

GenDuplicatePackages creates an array of packages with duplicates. the array will will take n/2 and use this is a mod operand along with the current index in the for loop. it is an error to set n to 0 or 1

func GenUniqueDistributionScanners

func GenUniqueDistributionScanners(n int) indexer.VersionedScanners

GenUniqueDistributionScanners creates n number of unique DistributionScanners. the array is gauranteed to not have any scanner fields be duplicates

func GenUniqueDistributions

func GenUniqueDistributions(n int) []*claircore.Distribution

GenUniqueDistributions creates an array of unique distributions. the array is guaranteed not to have any duplicately named dist fields.

func GenUniqueLayersRemote

func GenUniqueLayersRemote(n int, URIs []string) ([]*claircore.Layer, error)

GenUniqueLayers generates n unique layers and populates RemotePath.URI with the provided URIs. it is an error for n != len(URIs)

func GenUniquePackageScanners

func GenUniquePackageScanners(n int) indexer.VersionedScanners

GenUniquePackageScanners creates n number of unique PackageScanners. the array is gauranteed to not have any scanner fields be duplicates

func GenUniquePackages

func GenUniquePackages(n int) []*claircore.Package

GenUniquePackages creates an array of unique packages. the array is guaranteed not to have any duplicately named package fields. source packages are given an n + 1 ID to avoid duplicate primary key on insert.

func GenUniqueRepositories

func GenUniqueRepositories(n int) []*claircore.Repository

GenUniqueRepositories creates an array of unique repositories. the array is guaranteed not to have any duplicately named repo fields.

func GenUniqueRepositoryScanners

func GenUniqueRepositoryScanners(n int) indexer.VersionedScanners

GenUniqueRepositoryScanners creates n number of unique RepositoryScanners. the array is gauranteed to not have any scanner fields be duplicates

func GenUniqueVulnerabilities

func GenUniqueVulnerabilities(n int, updater string) []*claircore.Vulnerability

func NewRoundTripper

func NewRoundTripper(fn RoundTripFunc) http.RoundTripper

NewRoundTripper creates a http.RoundTripper with the provided RoundTripFunc. RountTripFunc should validate the incoming request is what's expected

func Updater added in v0.0.8

func Updater(file string) (driver.Updater, error)

Types

type RoundTripFunc

type RoundTripFunc func(req *http.Request) (*http.Response, error)

Directories

Path Synopsis
Package integration is a helper for running integration tests.
Package integration is a helper for running integration tests.

Jump to

Keyboard shortcuts

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