{"id":18936632,"url":"https://github.com/cloudevents/conformance","last_synced_at":"2025-04-15T17:37:24.097Z","repository":{"id":43253270,"uuid":"196437949","full_name":"cloudevents/conformance","owner":"cloudevents","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-14T15:25:47.000Z","size":115,"stargazers_count":33,"open_issues_count":4,"forks_count":20,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-28T23:11:12.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudevents.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-11T17:25:02.000Z","updated_at":"2023-09-20T07:55:53.000Z","dependencies_parsed_at":"2023-11-14T16:40:12.402Z","dependency_job_id":"dd8c47ed-71e9-40ed-878f-f9aac18bf4fb","html_url":"https://github.com/cloudevents/conformance","commit_stats":{"total_commits":36,"total_committers":8,"mean_commits":4.5,"dds":0.6111111111111112,"last_synced_commit":"7a8ee0ac0e782bba1ba30e58c62d24d2e6c337e5"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudevents%2Fconformance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudevents%2Fconformance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudevents%2Fconformance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudevents%2Fconformance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudevents","download_url":"https://codeload.github.com/cloudevents/conformance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249119786,"owners_count":21215811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T12:08:18.206Z","updated_at":"2025-04-15T17:37:24.075Z","avatar_url":"https://github.com/cloudevents.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudEvents Conformance Testing\n\n`cloudevents` is a tool for testing CloudEvents receivers.\n\n[![GoDoc](https://godoc.org/github.com/cloudevents/conformance?status.svg)](https://godoc.org/github.com/cloudevents/conformance)\n[![Go Report Card](https://goreportcard.com/badge/cloudevents/conformance)](https://goreportcard.com/report/cloudevents/conformance)\n\n_Work in progress._\n\n## Installation\n\n`cloudevents` can be installed via:\n\n```shell\ngo get github.com/cloudevents/conformance/cmd/cloudevents\n```\n\nTo update your installation:\n\n```shell\ngo get -u github.com/cloudevents/conformance/cmd/cloudevents\n```\n\n## Usage\n\n`cloudevents` has three commands at the moment: `send`, `invoke` and `listen`.\n\n### Send\n\n`send` will do a one-off creation of a cloudevent and send to a given target.\n\n```shell script\ncloudevents send http://localhost:8080 --id abc-123 --source cloudevents.conformance.tool --type foo.bar\n```\n\n### Invoke\n\n`invoke` will read yaml files, convert them to http and send them to the given\ntarget.\n\n```shell script\ncloudevents invoke http://localhost:8080 -f ./yaml/v0.3\n```\n\n### Listen\n\n`listen` will accept http request and write the converted yaml to stdout.\n\n```shell script\ncloudevents listen -v \u003e got.yaml\n```\n\nOptionally, you can forward the incoming request to a target.\n\n```shell script\ncloudevents listen -v -t http://localhost:8181 \u003e got.yaml\n```\n\n### Diff\n\n`diff` compares two yaml event files.\n\n```shell script\ncloudevents diff ./want.yaml ./got.yaml\n```\n\n`want.yaml` could have fewer fields specified to allow for fuzzy matching. \n\nExample, if you only wanted to compare on `type` and ignore additional fields:\n\n```shell script\n$ cat ./want.yaml\nContextAttributes:\n  type: com.example.someevent\n$ cat ./got.yaml\nMode: structured\nContextAttributes:\n  specversion: 1.0\n  type: com.example.someevent\n  time: 2018-04-05T03:56:24Z\n  id: 4321-4321-4321-a\n  source: /mycontext/subcontext\n  Extensions:\n    comexampleextension1 : \"value\"\n    comexampleextension2 : |\n      {\"othervalue\": 5}\nTransportExtensions:\n  user-agent: \"foo\"\nData: |\n  {\"world\":\"hello\"}\n\n$ cloudevents diff ./want.yaml ./got.yaml --match type --ignore-additions\n```\n\nThis validates that at least one event of type `com.example.someevent` is present in the `got.yaml` file.\n\n## Advanced Usage\n\nIf you would like to produce a pre-produced event yaml file, you can use\n`listen` to collect requests. This works with both running event producers that\ncan be directed at the `listen` port or directly with `send`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudevents%2Fconformance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudevents%2Fconformance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudevents%2Fconformance/lists"}