test

package
v0.0.0-...-72347e0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2019 The Knative Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	ProfileName      = "cov-profile.txt"
	KeyProfileName   = "key-cov-profile.txt"
	StdoutName       = "stdout.txt"
	CovTargetRootRel = "testTarget"
	CovTargetRelPath = CovTargetRootRel + "/presubmit"
)

Variables

View Source
var (
	InputArtifactsDir = AbsPath("testdata/artifacts")
	CovTargetDir      = AbsPath(CovTargetRelPath) + "/"
)

Functions

func AbsPath

func AbsPath(pathRelToProj string) string

func AssertEqual

func AssertEqual(t *testing.T, expected, actual interface{})

func DeleteDir

func DeleteDir(dir string)

func Fail

func Fail(t *testing.T, input, expected, actual interface{})

func FileOrDirExists

func FileOrDirExists(path string) bool

func LinkInputArts

func LinkInputArts(artsDir string, artNames ...string)

func MkdirAll

func MkdirAll(path string)

func NewArtsDir

func NewArtsDir(dirPrefix string) string

func ProjDir

func ProjDir() string

func StrFailure

func StrFailure(input, expected, actual string) string

StrFailure is used to display discrepancy between expected and actual result in test

Types

This section is empty.

Jump to

Keyboard shortcuts

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