istio: istio.io/istio/pkg/test/framework/components/policybackend Index | Files

package policybackend

import "istio.io/istio/pkg/test/framework/components/policybackend"

Index

Package Files

client.go kube.go native.go policybackend.go util.go

func ContainsReportJSON Uses

func ContainsReportJSON(t test.Failer, reports []proto.Message, expected string) bool

ContainsReportJSON checks whether the given proto array contains the expected string

type AdapterMode Uses

type AdapterMode int

AdapterMode enumerates the mode of policy backend usage

const (
    // OutOfProcess mode uses policy backend as an out of process adapter
    OutOfProcess AdapterMode = iota

    // InProcess mode uses policy backend as an infra backend for built-in bypass adapter
    InProcess
)

type Instance Uses

type Instance interface {
    resource.Resource

    // DenyCheck indicates that the policy backend should deny all incoming check requests when deny is
    // set to true.
    DenyCheck(t test.Failer, deny bool)

    // AllowCheck indicates the policy backend should allow all incoming check requests,
    // it also indicates the valid duration and valid count in the check result.
    AllowCheck(t test.Failer, d time.Duration, c int32)

    // ExpectReport checks that the backend has received the given report requests. The requests are consumed
    // after the call completes.
    ExpectReport(t test.Failer, expected ...proto.Message)

    // ExpectReportJSON checks that the backend has received the given report request.  The requests are
    // consumed after the call completes.
    ExpectReportJSON(t test.Failer, expected ...string)

    // GetReports reeturns the currently accumulated set of reports.
    GetReports(t test.Failer) []proto.Message

    // CreateConfigSnippet for the Mixer adapter to talk to this policy backend.
    // If adapter mode is in process, the supplied name will be the name of the handler.
    CreateConfigSnippet(name string, namespace string, am AdapterMode) string
}

Instance represents a deployed fake policy backend for Mixer.

func New Uses

func New(ctx resource.Context) (i Instance, err error)

New returns a new instance of policybackend.Instance.

func NewOrFail Uses

func NewOrFail(t test.Failer, s resource.Context) Instance

NewOrFail calls New and fails test if it returns an error.

Package policybackend imports 26 packages (graph). Updated 2019-10-06. Refresh now. Tools for package owners.