package testutils

import "github.com/docker/containerd/testutils"

Index

Variables

var (
	// ArchivesDir holds the location of the available rootfs
	ArchivesDir = filepath.Join("test-artifacts", "archives")
	// BundlesRoot holds the location where OCI Bundles are stored
	BundlesRoot = filepath.Join("test-artifacts", "oci-bundles")
	// OutputDirFormat holds the standard format used when creating a
	// new test output directory
	OutputDirFormat = filepath.Join("test-artifacts", "runs", "%s")
	// RefOciSpecsPath holds the path to the generic OCI config
	RefOciSpecsPath = filepath.Join(BundlesRoot, "config.json")
	// StateDir holds the path to the directory used by the containerd
	// started by tests
	StateDir = "/run/containerd-bench-test"
)

Functions

func CreateBundle

func CreateBundle(source, name string) error

CreateBundle generates a valid OCI bundle from the given rootfs

func CreateBusyboxBundle

func CreateBusyboxBundle(name string) error

CreateBusyboxBundle generates a bundle based on the busybox rootfs

func GenerateReferenceSpecs

func GenerateReferenceSpecs(destination string) error

GenerateReferenceSpecs generates a default OCI specs via `runc spec`

func GetTestOutDir

func GetTestOutDir() string

GetTestOutDir returns the output directory for testing and benchmark artifacts

Source Files

testutils.go

Version
v0.2.8 (latest)
Published
Mar 29, 2017
Platform
linux/amd64
Imports
5 packages
Last checked
13 hours ago

Tools for package owners.