beam: Index | Files

package passert

import ""

Package passert contains verification transformations for testing pipelines. The transformations are not tied to any particular runner, i.e., they can notably be used for remote execution runners, such as Dataflow.


Package Files

count.go equals.go hash.go passert.go passert.shims.go sum.go

func Count Uses

func Count(s beam.Scope, col beam.PCollection, name string, count int)

Count verifies the given PCollection<T> has the specified number of elements.

func Diff Uses

func Diff(s beam.Scope, a, b beam.PCollection) (left, both, right beam.PCollection)

Diff splits 2 incoming PCollections into 3: left only, both, right only. Duplicates are preserved, so a value may appear multiple times and in multiple collections. Coder equality is used to determine equality. Should only be used for small collections, because all values are held in memory at the same time.

func Empty Uses

func Empty(s beam.Scope, col beam.PCollection) beam.PCollection

Empty asserts that col is empty.

func Equals Uses

func Equals(s beam.Scope, col beam.PCollection, values ...interface{}) beam.PCollection

Equals verifies the given collection has the same values as the given values, under coder equality. The values can be provided as single PCollection.

func False Uses

func False(s beam.Scope, col beam.PCollection, fn interface{}) beam.PCollection

False asserts that the given predicate does not satisfy any element in the condition.

func Hash Uses

func Hash(s beam.Scope, col beam.PCollection, name, hash string, size int)

Hash validates that the incoming PCollection<string> has the given size and base64-encoded MD5 hash code. It buffers the entire PCollection in memory and sorts it for determinism.

func Sum Uses

func Sum(s beam.Scope, col beam.PCollection, name string, size, value int)

Sum validates that the sum and count of elements in the incoming PCollection<int> is the same as the given sum and count, under coder equality. Sum is a specialized version of Equals that avoids a lot of machinery for testing.

func True Uses

func True(s beam.Scope, col beam.PCollection, fn interface{}) beam.PCollection

True asserts that all elements satisfy the given predicate.

Package passert imports 17 packages (graph) and is imported by 5 packages. Updated 2020-06-18. Refresh now. Tools for package owners.