Skip to content

Commit

Permalink
Append -draft to new/updated types
Browse files Browse the repository at this point in the history
Append "-draft" to new and updated types. Also fix spelling of
"canceled" to be consistent with rest of repository.

Signed-off-by: Daniel Han <[email protected]>
  • Loading branch information
dan-han-101 committed Feb 8, 2024
1 parent b8a2a8b commit 4c5eef0
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.4.0-draft",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "/event/source/123",
"type": "dev.cdevents.testcaserun.cancelled.0.1.0",
"type": "dev.cdevents.testcaserun.canceled.0.1.0-draft",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
Expand All @@ -12,7 +12,7 @@
"type": "testCaseRun",
"content": {
"severity": "low",
"reason": "Cancelled by user 123",
"reason": "Canceled by user 123",
"environment": {
"id": "dev",
"source": "testkube-dev-123"
Expand Down
2 changes: 1 addition & 1 deletion examples/testcaserun_finished.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.4.0-draft",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "/event/source/123",
"type": "dev.cdevents.testcaserun.finished.0.2.0",
"type": "dev.cdevents.testcaserun.finished.0.2.0-draft",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
Expand Down
2 changes: 1 addition & 1 deletion examples/testcaserun_skipped.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.4.0-draft",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "/event/source/123",
"type": "dev.cdevents.testcaserun.skipped.0.1.0",
"type": "dev.cdevents.testcaserun.skipped.0.1.0-draft",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
Expand Down
2 changes: 1 addition & 1 deletion examples/testsuiterun_finished.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.4.0-draft",
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "/event/source/123",
"type": "dev.cdevents.testsuiterun.finished.0.2.0",
"type": "dev.cdevents.testsuiterun.finished.0.2.0-draft",
"timestamp": "2023-03-20T14:27:05.315384Z"
},
"subject": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cdevents.dev/0.4.0-draft/schema/test-case-run-cancelled-event",
"$id": "https://cdevents.dev/0.4.0-draft/schema/test-case-run-canceled-event",
"properties": {
"context": {
"properties": {
Expand All @@ -19,9 +19,9 @@
"type": {
"type": "string",
"enum": [
"dev.cdevents.testcaserun.cancelled.0.1.0"
"dev.cdevents.testcaserun.canceled.0.1.0-draft"
],
"default": "dev.cdevents.testcaserun.cancelled.0.1.0"
"default": "dev.cdevents.testcaserun.canceled.0.1.0-draft"
},
"timestamp": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions schemas/testcaserunfinished.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"type": {
"type": "string",
"enum": [
"dev.cdevents.testcaserun.finished.0.2.0"
"dev.cdevents.testcaserun.finished.0.2.0-draft"
],
"default": "dev.cdevents.testcaserun.finished.0.2.0"
"default": "dev.cdevents.testcaserun.finished.0.2.0-draft"
},
"timestamp": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions schemas/testcaserunskipped.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"type": {
"type": "string",
"enum": [
"dev.cdevents.testcaserun.skipped.0.1.0"
"dev.cdevents.testcaserun.skipped.0.1.0-draft"
],
"default": "dev.cdevents.testcaserun.skipped.0.1.0"
"default": "dev.cdevents.testcaserun.skipped.0.1.0-draft"
},
"timestamp": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions schemas/testsuiterunfinished.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"type": {
"type": "string",
"enum": [
"dev.cdevents.testsuiterun.finished.0.2.0"
"dev.cdevents.testsuiterun.finished.0.2.0-draft"
],
"default": "dev.cdevents.testsuiterun.finished.0.2.0"
"default": "dev.cdevents.testsuiterun.finished.0.2.0-draft"
},
"timestamp": {
"type": "string",
Expand Down
28 changes: 14 additions & 14 deletions testing-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ This specification defines three subjects in this stage: `testCaseRun`, `testSui
The predicates for `testCaseRun` must follow the following expectations:

- The following events are valid initial events: `queued`, `started`, or `skipped`.
- The following events must be preceded by some other event: `finished` and `cancelled`.
- A `queued` event must be followed by one of the following: `started`, `finished`, or `cancelled`.
- The following events must be preceded by some other event: `finished` and `canceled`.
- A `queued` event must be followed by one of the following: `started`, `finished`, or `canceled`.
- A `started` event must be followed by a `finished` event.
- The following events are terminal events, and will *not* be followed by other events: `finished`, `cancelled` and `skipped`.
- The following events are terminal events, and will *not* be followed by other events: `finished`, `canceled` and `skipped`.

| Subject | Description | Predicates |
|---------------------------------|----------------------------------------------|------------------------------------------------------------------------------------------------------------|
| [`testCaseRun`](#testcaserun) | The execution of a software testCase | [`queued`](#testcaserun-queued), [`started`](#testcaserun-started), [`finished`](#testcaserun-finished), [`cancelled`](#testcaserun-cancelled), [`skipped`](#testcaserun-skipped) |
| [`testCaseRun`](#testcaserun) | The execution of a software testCase | [`queued`](#testcaserun-queued), [`started`](#testcaserun-started), [`finished`](#testcaserun-finished), [`canceled`](#testcaserun-canceled), [`skipped`](#testcaserun-skipped) |
| [`testSuiteRun`](#testsuiterun) | The execution of a software testSuite | [`queued`](#testsuiterun-queued), [`started`](#testsuiterun-started), [`finished`](#testsuiterun-finished) |
| [`testOutput`](#testoutput) | An output artifact produced by a testCaseRun | [`published`](#testoutput-published) |

Expand Down Expand Up @@ -110,7 +110,7 @@ This event represents a started testCase execution.

This event represents a finished testCase execution. The event will contain the outcome and additional metadata as applicable.

- Event Type: __`dev.cdevents.testcaserun.finished.0.2.0`__
- Event Type: __`dev.cdevents.testcaserun.finished.0.2.0-draft`__
- Predicate: finished
- Subject: [`testCaseRun`](#testcaserun)

Expand All @@ -123,14 +123,14 @@ This event represents a finished testCase execution. The event will contain the
| testSuiteRun | `Object` [`testSuiteRun`](#testsuiterun) | A testSuiteRun to associate this testCaseRun with a containing testSuiteRun | `{"id":"Auth-TestSuite-execution-12334", "source": "staging/testkube"}` | |
| outcome | `String (enum)` | The outcome of the testSuite execution, one of `pass`, `fail`, `cancel`, `error`, `skip` | `pass` ||
| severity | `String (enum)` | Severity if the test failed, one of `low`, `medium`, `high`, `critical` | `critical` |
| reason | `String` | A reason related to the outcome of the execution | `Cancelled by user`, `Failed assertion`, `Timed out` | |
| reason | `String` | A reason related to the outcome of the execution | `Canceled by user`, `Failed assertion`, `Timed out` | |

### [`testCaseRun cancelled`](examples/testcaserun_cancelled.json)
### [`testCaseRun canceled`](examples/testcaserun_canceled.json)

This event represents a cancelled testCaseRun execution. This event should be emitted if a "queued" testCaseRun is stopped prior to the "testCaseRun.started" event.
This event represents a canceled testCaseRun execution. This event should be emitted if a "queued" testCaseRun is stopped prior to the "testCaseRun.started" event.

- Event Type: __`dev.cdevents.testcaserun.cancelled.0.1.0`__
- Predicate: cancelled
- Event Type: __`dev.cdevents.testcaserun.canceled.0.1.0-draft`__
- Predicate: canceled
- Subject: [`testCaseRun`](#testcaserun)

| Field | Type | Description | Examples | Required |
Expand All @@ -141,13 +141,13 @@ This event represents a cancelled testCaseRun execution. This event should be em
| testCase | `Object` [`testCase`](#testcase) | Definition of the testCase being executed | `{"id": "92834723894", "name": "Login Test", "type": "integration"}` | |
| testSuiteRun | `Object` [`testSuiteRun`](#testsuiterun) | A testSuiteRun to associate this testCaseRun with a containing testSuiteRun | `{"id":"Auth-TestSuite-execution-12334", "source": "staging/testkube"}` | |
| severity | `String` | Severity if the test failed, one of `low`, `medium`, `high`, `critical` | `critical` |
| reason | `String` | A reason related to the outcome of the execution | `Cancelled by user`, `Test run exceeded time limit` | |
| reason | `String` | A reason related to the outcome of the execution | `Canceled by user`, `Test run exceeded time limit` | |

### [`testCaseRun skipped`](examples/testcaserun_skipped.json)

This event represents a skipped testCaseRun execution. The event should only be emitted if there has been no prior "queued" or "started" event.

- Event Type: __`dev.cdevents.testcaserun.skipped.0.1.0`__
- Event Type: __`dev.cdevents.testcaserun.skipped.0.1.0-draft`__
- Predicate: skipped
- Subject: [`testCaseRun`](#testcaserun)

Expand Down Expand Up @@ -197,7 +197,7 @@ This event represents a started testSuite execution.

This event represents a finished testSuite execution. The event will contain the outcome and additional metadata as applicable.

- Event Type: __`dev.cdevents.testsuiterun.finished.0.2.0`__
- Event Type: __`dev.cdevents.testsuiterun.finished.0.2.0-draft`__
- Predicate: finished
- Subject: [`testSuiteRun`](#testsuiterun)

Expand All @@ -208,7 +208,7 @@ This event represents a finished testSuite execution. The event will contain the
| environment | `Object` [`environment`](continuous-deployment.md/#environment) | The environment in which this testSuiteRun was running | `{"id": "1234"}`, `{"id": "dev", "source": "testkube-dev-123"}` ||
| outcome | `String (enum)` | The outcome of the testSuite execution, one of `pass`, `fail`, `cancel`, `error`, `skip` | `fail` ||
| severity | `String (enum)` | Severity if the test failed, one of `low`, `medium`, `high`, `critical` | `critical`, `low`, `medium`, `high` |
| reason | `String` | A reason related to the outcome of the execution | `Cancelled by user`, `Failed testCase` | |
| reason | `String` | A reason related to the outcome of the execution | `Canceled by user`, `Failed testCase` | |
| testSuite | `Object` [`testSuite`](#testsuite) | Definition of the testSuite being executed | `{"id": "92834723894", "name": "Auth TestSuite"}` | |

### [`testOutput published`](examples/testoutput_published.json)
Expand Down

0 comments on commit 4c5eef0

Please sign in to comment.