istio: istio.io/istio/mixer/pkg/runtime/testing/data Index | Files

package data

import "istio.io/istio/mixer/pkg/runtime/testing/data"

Index

Package Files

adapters.go data.go logger.go templates.go

Variables

var FqdnListHandler3 = "hdynlist3.handler.istio-system"

FqdnListHandler3 is fqdn of ListHandler3

var FqnACheck1 = "hcheck1.acheck.istio-system"

FqnACheck1 is the fully qualified name of HandlerH1.

var FqnI1 = "icheck1.tcheck.istio-system"

FqnI1 is the fully qualified name for I1.

var HandlerACheck1 = `
apiVersion: "config.istio.io/v1alpha2"
kind: acheck
metadata:
  name: hcheck1
  namespace: istio-system
spec:
`

HandlerACheck1 is a handler of type acheck with name hcheck1.

var HandlerACheck2 = `
apiVersion: "config.istio.io/v1alpha2"
kind: acheck
metadata:
  name: hcheck2
  namespace: istio-system
spec:
`

HandlerACheck2 is a handler of type acheck with name hcheck2.

var HandlerACheck3NS2 = `
apiVersion: "config.istio.io/v1alpha2"
kind: acheck
metadata:
  name: hcheck3
  namespace: ns2
spec:
`

HandlerACheck3NS2 is a handler in namespace NS2.

var HandlerACheckOutput1 = `
apiVersion: config.istio.io/v1alpha2
kind: acheckoutput
metadata:
  name: hcheckoutput1
  namespace: istio-system
`

HandlerACheckOutput1 is a standard handler for type acheckoutput

var HandlerAPA1 = `
apiVersion: "config.istio.io/v1alpha2"
kind: apa
metadata:
  name: hapa1
  namespace: istio-system
spec:
`

HandlerAPA1 is an APA handler.

var HandlerAQuota1 = `
apiVersion: "config.istio.io/v1alpha2"
kind: aquota
metadata:
  name: hquota1
  namespace: istio-system
spec:
`

HandlerAQuota1 is a handler of type aquota with name hquota1.

var HandlerAReport1 = `
apiVersion: "config.istio.io/v1alpha2"
kind: areport
metadata:
  name: hreport1
  namespace: istio-system
spec:
`

HandlerAReport1 is a handler of type acheck with name hreport1.

var InstanceAPA1 = `
apiVersion: "config.istio.io/v1alpha2"
kind: tapa
metadata:
  name: iapa1
  namespace: istio-system
spec:
`

InstanceAPA1 is an APA instance

var InstanceAPA1WithSpec = "" /* 194 byte string literal not displayed */

InstanceAPA1WithSpec has a spec with expressions

var InstanceCheck1 = `
apiVersion: "config.istio.io/v1alpha2"
kind: tcheck
metadata:
  name: icheck1
  namespace: istio-system
spec:
`

InstanceCheck1 is a standard testing instance for template tcheck.

var InstanceCheck1WithSpec = "" /* 132 byte string literal not displayed */

InstanceCheck1WithSpec has a spec with expressions

var InstanceCheck2 = `
apiVersion: "config.istio.io/v1alpha2"
kind: tcheck
metadata:
  name: icheck2
  namespace: istio-system
spec:
`

InstanceCheck2 is another instance.

var InstanceCheck3 = `
apiVersion: "config.istio.io/v1alpha2"
kind: tcheck
metadata:
  name: icheck3
  namespace: istio-system
spec:
`

InstanceCheck3 is another instance.

var InstanceCheck4NS2 = `
apiVersion: "config.istio.io/v1alpha2"
kind: tcheck
metadata:
  name: icheck4
  namespace: ns2
spec:
`

InstanceCheck4NS2 is in the ns2 namespace

var InstanceCheckOutput1 = `
apiVersion: config.istio.io/v1alpha2
kind: tcheckoutput
metadata:
  name: icheckoutput1
  namespace: istio-system
`

InstanceCheckOutput1 is a standard testing instance for template tcheckoutput

var InstanceDynamic = "" /* 154 byte string literal not displayed */

InstanceDynamic is the instance of the template listentry

var InstanceHalt1 = `
apiVersion: "config.istio.io/v1alpha2"
kind: thalt
metadata:
  name: ihalt1
  namespace: istio-system
spec:
`

InstanceHalt1 is a standard testing instance.

var InstanceQuota1 = `
apiVersion: "config.istio.io/v1alpha2"
kind: tquota
metadata:
  name: iquota1
  namespace: istio-system
spec:
`

InstanceQuota1 is a standard testing instance for template tquota.

var InstanceQuota1WithSpec = "" /* 132 byte string literal not displayed */

InstanceQuota1WithSpec has a spec with expressions

var InstanceQuota2 = `
apiVersion: "config.istio.io/v1alpha2"
kind: tquota
metadata:
  name: iquota2
  namespace: istio-system
spec:
`

InstanceQuota2 is a copy of InstanceQuota1 with a different name.

var InstanceReport1 = `
apiVersion: "config.istio.io/v1alpha2"
kind: treport
metadata:
  name: ireport1
  namespace: istio-system
spec:
`

InstanceReport1 is a standard testing instance for template treport.

var InstanceReport1WithSpec = "" /* 134 byte string literal not displayed */

InstanceReport1WithSpec has a spec with expressions

var InstanceReport2 = `
apiVersion: "config.istio.io/v1alpha2"
kind: treport
metadata:
  name: ireport2
  namespace: istio-system
spec:
`

InstanceReport2 is a standard testing instance for template treport.

var ListHandler1 = "" /* 284 byte string literal not displayed */

ListHandler1 is a dynamic handler of listentry template named as hdynlist1

var ListHandler2 = "" /* 250 byte string literal not displayed */

ListHandler2 is a dynamic handler of listentry template named as hdynlist2

var ListHandler3 = "" /* 219 byte string literal not displayed */

ListHandler3 is a dynamic handler of listentry template named as hdynlist3

var ListHandler3Addr = "" /* 219 byte string literal not displayed */

ListHandler3Addr is a dynamic handler that is same as ListHandler3 but has different backend address

var Rule4CheckAndHalt = "" /* 238 byte string literal not displayed */

Rule4CheckAndHalt has two instances that goes to the same adapter, but have different templates.

var RuleApa1 = "" /* 188 byte string literal not displayed */

RuleApa1 is a rule that target APA.

var RuleCheck1 = "" /* 199 byte string literal not displayed */

RuleCheck1 is a standard testing instance config with name R1. It references I1 and H1.

var RuleCheck1TrueCondition = "" /* 215 byte string literal not displayed */

RuleCheck1TrueCondition is a standard testing instance config with name R1. It references I1 and H1.

var RuleCheck1WithBadCondition = "" /* 223 byte string literal not displayed */

RuleCheck1WithBadCondition has a parseable but not compilable condition

var RuleCheck1WithBadHandler = "" /* 209 byte string literal not displayed */

RuleCheck1WithBadHandler is a standard testing rule config with a bad handler name.

var RuleCheck1WithInstance1And2 = "" /* 233 byte string literal not displayed */

RuleCheck1WithInstance1And2 has instances icheck1 & icheck2.

var RuleCheck1WithInstance1And2Operation = "" /* 380 byte string literal not displayed */

RuleCheck1WithInstance1And2Operation has instances icheck1 & icheck2 and a header operation

var RuleCheck1WithInstance1And2WithMatchClause = "" /* 274 byte string literal not displayed */

RuleCheck1WithInstance1And2WithMatchClause is Rule Check1 with a conditional.

var RuleCheck1WithMatchClause = "" /* 240 byte string literal not displayed */

RuleCheck1WithMatchClause is Rule Check1 with a conditional.

var RuleCheck1WithNonBooleanCondition = "" /* 225 byte string literal not displayed */

RuleCheck1WithNonBooleanCondition has a non-boolean condition.

var RuleCheck2WithHandler2AndInstance2 = "" /* 199 byte string literal not displayed */

RuleCheck2WithHandler2AndInstance2 references hcheck2 and icheck2.

var RuleCheck2WithInstance1AndHandler = "" /* 199 byte string literal not displayed */

RuleCheck2WithInstance1AndHandler is Rule Check1 with a different name.

var RuleCheck2WithInstance2And3 = "" /* 233 byte string literal not displayed */

RuleCheck2WithInstance2And3 references instances icheck2 and icheck2.

var RuleCheck2WithInstance2And3WithMatchClause = "" /* 277 byte string literal not displayed */

RuleCheck2WithInstance2And3WithMatchClause is RuleCheck2WithInstance2And3 with a conditional.

var RuleCheck3NS2 = "" /* 181 byte string literal not displayed */

RuleCheck3NS2 is check rule in namespace NS2

var RuleCheckHeaderOpWithNoActions = "" /* 221 byte string literal not displayed */

RuleCheckHeaderOpWithNoActions has a responseHeaderOperation, but no actions. Should not be elided.

var RuleCheckNoActionsOrHeaderOps = "" /* 156 byte string literal not displayed */

RuleCheckNoActionsOrHeaderOps has no actions and no responseHeaderOperations. Should be elided.

var RuleCheckOutput1 = "" /* 370 byte string literal not displayed */

RuleCheckOutput1 is a standard testing rule for check output template

var RuleCheckOutput2 = "" /* 623 byte string literal not displayed */

RuleCheckOutput2 is a testing rule for check output template with multiple outputs

var RuleDynamic = "" /* 204 byte string literal not displayed */

RuleDynamic is a testing rule of dynamic instance idynlistentry1 and dynamic handler hdynlist3

var RuleQuota1 = "" /* 199 byte string literal not displayed */

RuleQuota1 is a standard testing instance config with name rquota1. It references I1 and H1.

var RuleQuota1Conditional = "" /* 232 byte string literal not displayed */

RuleQuota1Conditional conditionally selects iquota1

var RuleQuota2 = "" /* 199 byte string literal not displayed */

RuleQuota2 references iquota1 and hquota1.

var RuleReport1 = "" /* 204 byte string literal not displayed */

RuleReport1 is a standard testing instance config with name rreport1. It references I1 and H1.

var RuleReport1And2 = "" /* 240 byte string literal not displayed */

RuleReport1And2 is a standard testing instance config with name rreport1.

var ServiceConfig = "" /* 466 byte string literal not displayed */

ServiceConfig is a standard service config.

func BuildAdapters Uses

func BuildAdapters(l *Logger, settings ...FakeAdapterSettings) map[string]*adapter.Info

BuildAdapters builds a standard set of testing adapters. The supplied settings is used to override behavior.

func BuildTemplates Uses

func BuildTemplates(l *Logger, settings ...FakeTemplateSettings) map[string]*template.Info

BuildTemplates builds a standard set of testing templates. The supplied settings is used to override behavior.

func JoinConfigs Uses

func JoinConfigs(configs ...string) string

JoinConfigs is a utility for joining various pieces of config for consumption by store code.

func ReadConfigs Uses

func ReadConfigs(paths ...string) (string, error)

ReadConfigs reads config from the given path list and returns them as a string.

type FakeAdapterSettings Uses

type FakeAdapterSettings struct {
    Name                    string
    PanicAtSetAdapterConfig bool
    PanicData               interface{}
    PanicAtValidate         bool
    ErrorAtValidate         bool
    ErrorAtBuild            bool
    PanicAtBuild            bool
    NilBuilder              bool
    NilHandlerAtBuild       bool
    ErrorAtHandlerClose     bool
    PanicAtHandlerClose     bool
    SpawnDaemon             bool
    SpawnWorker             bool
    CloseGoRoutines         bool

    SupportedTemplates []string
}

FakeAdapterSettings describes the behavior of a fake adapter.

type FakeEnv Uses

type FakeEnv struct {
}

FakeEnv is a dummy implementation of adapter.Env

func (*FakeEnv) Logger Uses

func (f *FakeEnv) Logger() adapter.Logger

Logger is an implementation of adapter.Env.Logger.

func (*FakeEnv) ScheduleDaemon Uses

func (f *FakeEnv) ScheduleDaemon(fn adapter.DaemonFunc)

ScheduleDaemon is an implementation of adapter.Env.ScheduleDaemon.

func (*FakeEnv) ScheduleWork Uses

func (f *FakeEnv) ScheduleWork(fn adapter.WorkFunc)

ScheduleWork is an implementation of adapter.Env.ScheduleWork.

type FakeHandler Uses

type FakeHandler struct {
    // contains filtered or unexported fields
}

FakeHandler is a fake implementation of adapter.Handler.

func (*FakeHandler) Close Uses

func (f *FakeHandler) Close() error

Close is an implementation of adapter.Handler.Close.

type FakeHandlerBuilder Uses

type FakeHandlerBuilder struct {
    // contains filtered or unexported fields
}

FakeHandlerBuilder is a fake of HandlerBuilder.

func (*FakeHandlerBuilder) Build Uses

func (f *FakeHandlerBuilder) Build(_ context.Context, env adapter.Env) (adapter.Handler, error)

Build is an implementation of HandlerBuilder.Build.

func (*FakeHandlerBuilder) SetAdapterConfig Uses

func (f *FakeHandlerBuilder) SetAdapterConfig(cfg adapter.Config)

SetAdapterConfig is an implementation of HandlerBuilder.SetAdapterConfig.

func (*FakeHandlerBuilder) Validate Uses

func (f *FakeHandlerBuilder) Validate() *adapter.ConfigErrors

Validate is an implementation of HandlerBuilder.Validate.

type FakeTemplateSettings Uses

type FakeTemplateSettings struct {
    Name                           string
    ErrorAtCreateInstance          bool
    ErrorAtCreateInstanceBuilder   bool
    ErrorAtCreateOutputExpressions bool
    ErrorAtInferType               bool
    BuilderDoesNotSupportTemplate  bool
    HandlerDoesNotSupportTemplate  bool
    PanicOnDispatchCheck           bool
    ErrorOnDispatchCheck           bool
    PanicOnDispatchReport          bool
    ErrorOnDispatchReport          bool
    PanicOnDispatchQuota           bool
    ErrorOnDispatchQuota           bool
    PanicOnDispatchGenAttrs        bool
    ErrorOnDispatchGenAttrs        bool
    PanicData                      interface{}
    QuotaResults                   []adapter.QuotaResult
    CheckResults                   []adapter.CheckResult
    OutputAttrs                    map[string]interface{}

    // template will signal the receipt of an incoming dispatch on this channel
    ReceivedCallChannel chan struct{}

    // template will wait on this channel before completing the dispatch
    CommenceSignalChannel chan struct{}
}

FakeTemplateSettings describes the behavior of a fake template.

type Logger Uses

type Logger struct {
    // contains filtered or unexported fields
}

Logger is used to capture the events that happen within fake adapters & templates during testing.

func (*Logger) Clear Uses

func (l *Logger) Clear()

Clear the contents of this logger. Useful for reducing the event output to Write more readable tests.

func (*Logger) String Uses

func (l *Logger) String() string

String returns the current contents of the log.

func (*Logger) Write Uses

func (l *Logger) Write(name string, s string)

Write s to the log, with a prefix of name. A newline character is added.

func (*Logger) WriteFormat Uses

func (l *Logger) WriteFormat(name string, format string, args ...interface{})

WriteFormat writes a formatted string to the log, with a prefix of name. A newline character is added.

Package data imports 16 packages (graph). Updated 2019-06-12. Refresh now. Tools for package owners.