helpers

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrokerEventTransformationMetricsTestHelper added in v0.16.0

func BrokerEventTransformationMetricsTestHelper(client *lib.Client, projectID string, brokerURL url.URL, brokerName string)

func BrokerEventTransformationTestHelper

func BrokerEventTransformationTestHelper(client *lib.Client, brokerURL url.URL, brokerName string, needRetry bool)

func BrokerEventTransformationTestWithAuditLogsSourceHelper

func BrokerEventTransformationTestWithAuditLogsSourceHelper(client *lib.Client, authConfig lib.AuthConfig, brokerURL url.URL, brokerName string)

func BrokerEventTransformationTestWithPubSubSourceHelper

func BrokerEventTransformationTestWithPubSubSourceHelper(client *lib.Client, authConfig lib.AuthConfig, brokerURL url.URL, brokerName string)

func BrokerEventTransformationTestWithSchedulerSourceHelper

func BrokerEventTransformationTestWithSchedulerSourceHelper(client *lib.Client, authConfig lib.AuthConfig, brokerURL url.URL, brokerName string)

func BrokerEventTransformationTestWithStorageSourceHelper

func BrokerEventTransformationTestWithStorageSourceHelper(client *lib.Client, authConfig lib.AuthConfig, brokerURL url.URL, brokerName string)

func BrokerEventTransformationTracingTestHelper added in v0.16.0

func BrokerEventTransformationTracingTestHelper(client *lib.Client, projectID string, brokerURL url.URL, brokerName string)

func CreateKService

func CreateKService(client *lib.Client, imageName string) string

func VerifyTrace added in v0.16.0

func VerifyTrace(t *testing.T, testTree TestSpanTree, projectID string, traceID string)

Types

type SpanMatcher added in v0.16.0

type SpanMatcher struct {
	Name   string
	Kind   *cloudtrace.TraceSpan_SpanKind
	Labels map[string]string
}

func (*SpanMatcher) MatchesSpan added in v0.16.0

func (m *SpanMatcher) MatchesSpan(span *cloudtrace.TraceSpan) error

type SpanTree added in v0.16.0

type SpanTree struct {
	Span     *cloudtrace.TraceSpan
	Children []SpanTree
}

SpanTree is the tree of Spans representation of a Trace.

func GetTraceTree added in v0.16.0

func GetTraceTree(trace *cloudtrace.Trace) (*SpanTree, error)

GetTraceTree converts a set slice of spans into a SpanTree.

type TestSpanTree added in v0.16.0

type TestSpanTree struct {
	Name     string
	Span     *SpanMatcher
	Children []TestSpanTree
}

TestSpanTree is the expected version of SpanTree used for assertions in testing.

func BrokerTestTree added in v0.16.0

func BrokerTestTree(namespace string, brokerName string, trigger string, respTrigger string) TestSpanTree

func (TestSpanTree) MatchesSubtree added in v0.16.0

func (tt TestSpanTree) MatchesSubtree(t *testing.T, actual *SpanTree) (matches [][]SpanTree)

MatchesSubtree checks to see if this TestSpanTree matches a subtree of the actual SpanTree. It is intended to be used for assertions while testing. Returns the set of possible subtree matches with the corresponding set of unmatched siblings.

Jump to

Keyboard shortcuts

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