conformance

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

README

Conformance tests

Adding conformance tests

Knative Serving conformance tests can be run against any implementation of the Knative Serving API to ensure the API has been implemented consistently. Passing these tests indicates that apps and functions deployed to this implementation could be ported to other implementations as well.

The precedent for these tests is the k8s conformance tests.

These tests use the test library.

Requirements

The conformance tests should ONLY cover functionality that applies to any implementation of the API.

The conformance tests MUST:

  1. Provide frequent output describing what actions they are undertaking, especially before performing long running operations. Please see the Log section for detailed instructions.
  2. Follow Golang best practices.
  3. Not require any specific file system permissions to run or require any additional binaries to be installed in the target environment before the tests run.
  4. Not depend on any k8s resources outside of those added by Knative Serving OR they should provide flags that allow the test to run without access to those resources.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MustFilePathSpecs = map[string]FilePathInfo{
	"/tmp": {
		IsDirectory: true,
		PermString:  "rw*rw*rw*",
	},
	"/var/log": {
		IsDirectory: true,
		PermString:  "rw*rw*rw*",
	},
}

MustFilePathSpecs specifies the file-paths and expected permissions that MUST be set as specified in the runtime contract.

View Source
var ShouldFilePathSpecs = map[string]FilePathInfo{
	"/etc/resolv.conf": {
		IsDirectory: false,
		PermString:  "rw*r**r**",
	},
}

ShouldFilePathSpecs specifies the file-paths and expected permissions that SHOULD be set as specified in the run-time contract.

Functions

This section is empty.

Types

type FilePathInfo

type FilePathInfo struct {
	FilePath    string `json:"FilePath"`
	IsDirectory bool   `json:"IsDirectory"`
	PermString  string `json:"PermString"`
}

FilePathInfo data object returned by the environment test-image.

type MustEnvvars

type MustEnvvars struct {
	Port string `json:"PORT"`
}

MustEnvvars defines environment variables that "MUST" be set.

type ShouldEnvvars

type ShouldEnvvars struct {
	Service       string `json:"K_SERVICE"`
	Configuration string `json:"K_CONFIGURATION"`
	Revision      string `json:"K_REVISION"`
}

ShouldEnvvars defines the environment variables that "SHOULD" be set.

Jump to

Keyboard shortcuts

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