Skip to content

Releases: cloudevents/conformance

Improved diff

11 Mar 22:46
7a8ee0a
Compare
Choose a tag to compare

Found a bug where I expected to be able to say --match foo,bar but cobra does not split on comma, adding the ability to split on comma for the match flag.

Improved matching and searching while diffing a to b events.

Adding Diff command

07 Mar 18:13
3302931
Compare
Choose a tag to compare

diff compares two yaml event files.

cloudevents diff ./want.yaml ./got.yaml

want.yaml could have fewer fields specified to allow for fuzzy matching.

Example, if you only wanted to compare on type and ignore additional fields:

$ cat ./want.yaml
ContextAttributes:
  type: com.example.someevent
$ cat ./got.yaml
Mode: structured
ContextAttributes:
  specversion: 1.0
  type: com.example.someevent
  time: 2018-04-05T03:56:24Z
  id: 4321-4321-4321-a
  source: /mycontext/subcontext
  Extensions:
    comexampleextension1 : "value"
    comexampleextension2 : |
      {"othervalue": 5}
TransportExtensions:
  user-agent: "foo"
Data: |
  {"world":"hello"}

$ cloudevents diff ./want.yaml ./got.yaml --match type --ignore-additions

This validates that at least one event of type com.example.someevent is present in the got.yaml file.

Adding history to listen command to cli.

03 Mar 22:40
c59d2d6
Compare
Choose a tag to compare

New feature: return back the events that listen has collected via a GET on /history .

Start the listener:

$ cloudevents listen
listening on :8080

Send a cloudevent:

$ cloudevents send http://localhost:8080/ --id abc-123 --source cloudevents.conformance.tool --type foo.bar

See it is collected by the listener:

$  go run ./cmd/cloudevents listen
listening on :8080
Mode: binary
ContextAttributes:
  specversion: "1.0"
  type: foo.bar
  id: abc-123
  source: cloudevents.conformance.tool
TransportExtensions:
  User-Agent: Go-http-client/1.1
Data: ""
---

Collect history:

$ curl http://localhost:8080/history
Mode: binary
ContextAttributes:
  specversion: "1.0"
  type: foo.bar
  id: abc-123
  source: cloudevents.conformance.tool
TransportExtensions:
  User-Agent: Go-http-client/1.1
Data: ""

Adding Structured mode support.

05 Apr 15:50
eddc279
Compare
Choose a tag to compare
Pre-release

Use via the new top-level yaml header: Mode: structured

Mode: structured
ContextAttributes:
  specversion: 1.0
  type: com.example.someevent
  id: 4321-4321-4321
  source: /mycontext/subcontext

Or

cloudevents send http://localhost:8080/ --id 321-cba --source cloudevents.conformance.tool --type foo.json --mode structured --data='{"hello":"world"}'

The data parsing in structured mode is very basic.

Release v0.1.0

02 Apr 17:25
0f65088
Compare
Choose a tag to compare
Release v0.1.0 Pre-release
Pre-release

First release of conformance cli and supporting code.