Skip to content

Add test.HasExtensionsKeys assertion helper #900

@embano1

Description

@embano1

Sometimes it might be helpful to have an assertion helper in integration tests to assert that specific extension keys are present in the produced outEvent, not knowing the extension values upfront, such as when the transport adds extensions. The current helpers always compare extension keys and values which fails the test.

Proposing test.HasExtensionsKeys to only assert that a specific extension key is set if the value is not known upfront/not of interest during assertions.

Ref: https://github.com/cloudevents/sdk-go/pull/896/files#r1203500742

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions