Documentation ¶
Index ¶
Constants ¶
View Source
const ( ExampleVsName = "example-vs" ExampleUpstreamName = "nginx-upstream" SplitWebhookBasicUpstreamName = "json-upstream" OTELGatewayName = "otel-gateway" OTELCollectorUpstreamName = "opentelemetry-collector" ValidVsName = "i-am-valid" InvalidVsName = "i-am-invalid" )
Variables ¶
View Source
var ( // setup configs ExampleVS = filepath.Join(util.MustGetThisDir(), "testdata", "example-vs.yaml") ExampleUpstream = filepath.Join(util.MustGetThisDir(), "testdata", "example-upstream.yaml") SetupOTEL = filepath.Join(util.MustGetThisDir(), "testdata", "setup-otel.yaml") OTELUpstream = filepath.Join(util.MustGetThisDir(), "testdata", "otel-upstream.yaml") // Switch VirtualService configs (allow warnings) InvalidVS = filepath.Join(util.MustGetThisDir(), "testdata", "switch-vs", "invalid-vs.yaml") ValidVS = filepath.Join(util.MustGetThisDir(), "testdata", "switch-vs", "valid-vs.yaml") SwitchVS = filepath.Join(util.MustGetThisDir(), "testdata", "switch-vs", "switch-valid-invalid.yaml") // Secret Configs (allow warnings, strict tests) SecretVSTemplate = filepath.Join(util.MustGetThisDir(), "testdata", "secret-deletion", "vs-with-secret.yaml") UnusedSecret = filepath.Join(util.MustGetThisDir(), "testdata", "secret-deletion", "unused-secret.yaml") Secret = filepath.Join(util.MustGetThisDir(), "testdata", "secret-deletion", "secret.yaml") // Invalid resources (allow warnings, strict, allow all) InvalidUpstreamNoPort = filepath.Join(util.MustGetThisDir(), "testdata", "invalid-resources", "invalid-upstream-no-port.yaml") InvalidGateway = filepath.Join(util.MustGetThisDir(), "testdata", "invalid-resources", "gateway.yaml") InvalidVirtualServiceMatcher = filepath.Join(util.MustGetThisDir(), "testdata", "invalid-resources", "vs-method-matcher.yaml") InvalidVirtualServiceTypo = filepath.Join(util.MustGetThisDir(), "testdata", "invalid-resources", "vs-typo.yaml") InvalidVirtualMissingUpstream = filepath.Join(util.MustGetThisDir(), "testdata", "invalid-resources", "vs-no-upstream.yaml") InvalidRLC = filepath.Join(util.MustGetThisDir(), "testdata", "invalid-resources", "rlc.yaml") InvalidGatewayMissingUpstream = filepath.Join(util.MustGetThisDir(), "testdata", "invalid-resources", "gateway-no-upstream.yaml") // transformation validation (allow warnings, server_enabled) VSTransformationExtractors = filepath.Join(util.MustGetThisDir(), "testdata", "transformation", "vs-transform-extractors.yaml") VSTransformationHeaderText = filepath.Join(util.MustGetThisDir(), "testdata", "transformation", "vs-transform-header-text.yaml") VSTransformationSingleReplace = filepath.Join(util.MustGetThisDir(), "testdata", "transformation", "vs-transform-single-replace.yaml") ExpectedUpstreamResp = &testmatchers.HttpResponse{ StatusCode: http.StatusOK, Body: gomega.ContainSubstring("Welcome to nginx!"), } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.