cmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "container-structure-test",
	Short: "container-structure-test provides a framework to test the structure of a container image",
	Long: `container-structure-test provides a powerful framework to validate
the structure of a container image.
These tests can be used to check the output of commands in an image, 
as well as verify metadata and contents of the filesystem.`,
	PersistentPreRun: func(c *cobra.Command, s []string) {
		ll, err := logrus.ParseLevel(logLevel)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
		logrus.SetLevel(ll)
	},
}
View Source
var TestCmd = &cobra.Command{
	Use:   "test",
	Short: "Runs the tests",
	Long:  `Runs the tests`,
	Args: func(cmd *cobra.Command, _ []string) error {
		return validateArgs()
	},
	Run: func(cmd *cobra.Command, _ []string) {
		testResults := Run()
		out := &output.OutWriter{
			Verbose: verbose,
			Quiet:   quiet,
		}
		os.Exit(out.OutputResults(testResults))
	},
}

Functions

func Parse

func Parse(fp string) (types.StructureTest, error)

func Run

func Run() []*unversioned.FullResult

func RunTests

func RunTests() []*unversioned.FullResult

Types

This section is empty.

Jump to

Keyboard shortcuts

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