{"modulePath":"github.com/openshift/serving","version":"v0.10.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package testing\n\n## Functions\n\n```go\nfunc MutateK8sService(svc *corev1.Service)\n```\nMutateK8sService changes the service in a way that must be reconciled.\n\n```go\nfunc SKS(ns, name string, so ...SKSOption) *netv1alpha1.ServerlessService\n```\nSKS creates a generic ServerlessService object.\n\n```go\nfunc WithEndpointsOwnersRemoved(eps *corev1.Endpoints)\n```\nWithEndpointsOwnersRemoved clears the owner references of this Endpoints resource.\n\n```go\nfunc WithHPAClass(pa *asv1a1.PodAutoscaler)\n```\nWithHPAClass updates the PA to add the hpa class annotation.\n\n```go\nfunc WithK8sSvcOwnersRemoved(svc *corev1.Service)\n```\nWithK8sSvcOwnersRemoved clears the owner references of this Service.\n\n```go\nfunc WithMetricOwnersRemoved(m *asv1a1.Metric)\n```\nWithMetricOwnersRemoved clears the owner references of this PodAutoscaler.\n\n```go\nfunc WithPADeletionTimestamp(r *asv1a1.PodAutoscaler)\n```\nWithPADeletionTimestamp will set the DeletionTimestamp on the PodAutoscaler.\n\n```go\nfunc WithPAOwnersRemoved(pa *asv1a1.PodAutoscaler)\n```\nWithPAOwnersRemoved clears the owner references of this PA resource.\n\n```go\nfunc WithPodAutoscalerOwnersRemoved(r *asv1a1.PodAutoscaler)\n```\nWithPodAutoscalerOwnersRemoved clears the owner references of this PodAutoscaler.\n\n```go\nfunc WithPrivateService(sks *netv1alpha1.ServerlessService)\n```\nWithPrivateService annotates SKS status with the private service name.\n\n```go\nfunc WithProxyMode(sks *netv1alpha1.ServerlessService)\n```\nWithProxyMode puts SKS into proxy mode.\n\n```go\nfunc WithPubService(sks *netv1alpha1.ServerlessService)\n```\nWithPubService annotates SKS status with the given service name.\n\n```go\nfunc WithReachabilityReachable(pa *asv1a1.PodAutoscaler)\n```\nWithReachabilityReachable sets the reachability of the PodAutoscaler to reachable\n\n```go\nfunc WithReachabilityUnknown(pa *asv1a1.PodAutoscaler)\n```\nWithReachabilityUnknown sets the reachability of the PodAutoscaler to unknown\n\n```go\nfunc WithReachabilityUnreachable(pa *asv1a1.PodAutoscaler)\n```\nWithReachabilityUnreachable sets the reachability of the PodAutoscaler to unreachable\n\n```go\nfunc WithSKSOwnersRemoved(sks *netv1alpha1.ServerlessService)\n```\nWithSKSOwnersRemoved clears the owner references of this SKS resource.\n\n```go\nfunc WithSKSReady(sks *netv1alpha1.ServerlessService)\n```\nWithSKSReady marks SKS as ready.\n\n```go\nfunc WithSubsets(ep *corev1.Endpoints)\n```\nWithSubsets adds subsets to the body of a Revision, enabling us to refer readiness.\n\n```go\nfunc WithTraffic(pa *asv1a1.PodAutoscaler)\n```\nWithTraffic updates the PA to reflect it receiving traffic.\n\n## Types\n\n```go\ntype EndpointsOption func(*corev1.Endpoints)\n```\nEndpointsOption enables further configuration of the Kubernetes Endpoints.\n\n```go\ntype IngressOption func(netv1alpha1.IngressAccessor)\n```\nIngressOption enables further configuration of the IngressAccessor.\n\n```go\nfunc WithHosts(index int, hosts ...string) IngressOption\n```\nWithHosts sets the Hosts of the ingress rule specified index\n\n```go\ntype K8sServiceOption func(*corev1.Service)\n```\nK8sServiceOption enables further configuration of the Kubernetes Service.\n\n```go\nfunc OverrideServiceName(name string) K8sServiceOption\n```\nOverrideServiceName changes the name of the Kubernetes Service.\n\n```go\nfunc SvcWithAnnotationValue(key, value string) K8sServiceOption\n```\n\n```go\nfunc WithClusterIP(ip string) K8sServiceOption\n```\nWithClusterIP assigns a ClusterIP to the K8s Service.\n\n```go\nfunc WithExternalName(name string) K8sServiceOption\n```\nWithExternalName gives external name to the K8s Service.\n\n```go\nfunc WithSvcSelector(sel map[string]string) K8sServiceOption\n```\nWithSvcSelector sets the selector of the service.\n\n```go\ntype PodAutoscalerOption func(*asv1a1.PodAutoscaler)\n```\nPodAutoscalerOption is an option that can be applied to a PA.\n\n```go\nfunc MarkResourceNotOwnedByPA(rType, name string) PodAutoscalerOption\n```\nMarkResourceNotOwnedByPA marks PA when it's now owning a resources it is supposed to own.\n\n```go\nfunc WithBufferedTraffic(reason, message string) PodAutoscalerOption\n```\nWithBufferedTraffic updates the PA to reflect that it has received and buffered traffic while it is being activated.\n\n```go\nfunc WithLowerScaleBound(i int) PodAutoscalerOption\n```\nWithLowerScaleBound sets minScale to the given number.\n\n```go\nfunc WithMSvcStatus(s string) PodAutoscalerOption\n```\nWithMSvcStatus sets the name of the metrics service.\n\n```go\nfunc WithMetricAnnotation(metric string) PodAutoscalerOption\n```\nWithMetricAnnotation adds a metric annotation to the PA.\n\n```go\nfunc WithNoTraffic(reason, message string) PodAutoscalerOption\n```\nWithNoTraffic updates the PA to reflect the fact that it is not receiving traffic.\n\n```go\nfunc WithPAContainerConcurrency(cc int64) PodAutoscalerOption\n```\nWithPAContainerConcurrency returns a PodAutoscalerOption which sets the PodAutoscaler containerConcurrency to the provided value.\n\n```go\nfunc WithPAStatusService(svc string) PodAutoscalerOption\n```\nWithPAStatusService annotats PA Status with the provided service name.\n\n```go\nfunc WithPanicThresholdPercentageAnnotation(percentage string) PodAutoscalerOption\n```\nWithPanicThresholdPercentageAnnotation returns a PodAutoscalerOption which sets the PodAutoscaler autoscaling.knative.dev/targetPanicPercentage annotation to the provided value.\n\n```go\nfunc WithPanicWindowPercentageAnnotation(percentage string) PodAutoscalerOption\n```\nWithPanicWindowPercentageAnnotation retturn a PodAutoscalerOption which set the PodAutoscaler autoscaling.knative.dev/windowPanicPercentage annotation to the provided value.\n\n```go\nfunc WithProtocolType(pt networking.ProtocolType) PodAutoscalerOption\n```\nWithProtocolType sets the protocol type on the PodAutoscaler.\n\n```go\nfunc WithReachability(r asv1a1.ReachabilityType) PodAutoscalerOption\n```\nWithReachability sets the reachability of the PodAutoscaler to the given value\n\n```go\nfunc WithTUAnnotation(tu string) PodAutoscalerOption\n```\nWithTUAnnotation returns a PodAutoscalerOption which sets the PodAutoscaler autoscaling.knative.dev/targetUtilizationPercentage annotation to the provided value.\n\n```go\nfunc WithTargetAnnotation(target string) PodAutoscalerOption\n```\nWithTargetAnnotation returns a PodAutoscalerOption which sets the PodAutoscaler autoscaling.knative.dev/target annotation to the provided value.\n\n```go\nfunc WithUpperScaleBound(i int) PodAutoscalerOption\n```\nWithUpperScaleBound sets maxScale to the given number.\n\n```go\nfunc WithWindowAnnotation(window string) PodAutoscalerOption\n```\nWithWindowAnnotation returns a PodAutoScalerOption which sets the PodAutoscaler autoscaling.knative.dev/window annotation to the provided value.\n\n```go\ntype PodOption func(*corev1.Pod)\n```\nPodOption enables further configuration of a Pod.\n\n```go\nfunc WithFailingContainer(name string, exitCode int, message string) PodOption\n```\nWithFailingContainer sets the .Status.ContainerStatuses on the pod to include a container named accordingly to fail with the given state.\n\n```go\nfunc WithUnschedulableContainer(reason, message string) PodOption\n```\nWithUnschedulableContainer sets the .Status.Conditionss on the pod to include \\`PodScheduled\\` status to \\`False\\` with the given message and reason.\n\n```go\nfunc WithWaitingContainer(name, reason, message string) PodOption\n```\nWithWaitingContainer sets the .Status.ContainerStatuses on the pod to include a container named accordingly to wait with the given state.\n\n```go\ntype SKSOption func(sks *netv1alpha1.ServerlessService)\n```\nSKSOption is a callback type for decorate SKS objects.\n\n```go\nfunc WithDeployRef(name string) SKSOption\n```\nWithDeployRef annotates SKS with a deployment objectRef\n\n","path":"github.com/openshift/serving/pkg/testing","name":"testing","synopsis":"","isRedistributable":true}
