testing

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2020 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

http://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

This section is empty.

Variables

This section is empty.

Functions

func AssertDeepEqual

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

func AssertEqual

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

func DeepMatchWithPath added in v0.22.0

func DeepMatchWithPath(actual mf.Manifest, expectedManifestPath string) bool

DeepMatchWithPath returns true if the resources in the actual manifest match exactly the same resources in the expected manifest of the expected path. Two manifests are identical, in terms of every attribute. The number of the resources has to match.

func MakeDaemonSet

func MakeDaemonSet(name string, podSpec corev1.PodSpec) *appsv1.DaemonSet

func MakeDeployment

func MakeDeployment(name string, podSpec corev1.PodSpec) *appsv1.Deployment

func MakeUnstructured

func MakeUnstructured(t *testing.T, obj interface{}) unstructured.Unstructured

func ResourceContainingWithPath added in v0.22.0

func ResourceContainingWithPath(actual mf.Manifest, expectedManifestPath string) bool

ResourceContainingWithPath returns true if the resources in the actual manifest contains all the resources in the expected manifest of the expected path, but the number of resources is not necessarily the same. For the identical resources, they need to match in terms of every attribute.

func ResourceMatchWithPath added in v0.22.0

func ResourceMatchWithPath(actual mf.Manifest, expectedManifestPath string) bool

ResourceMatchWithPath returns true if the resources in the actual manifest match the same resources in the expected manifest of the expected path, in terms of name, namespace, group and kind. The number of resources does not necessarily have to match.

Types

This section is empty.

Jump to

Keyboard shortcuts

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