1
1
@contentrepository
2
- Feature : As a user of the CR I want to export the event stream
2
+ Feature : As a user of the CR I want to import events using the EventStoreImportProcessor
3
3
4
4
Background :
5
5
Given using no content dimensions
@@ -11,56 +11,59 @@ Feature: As a user of the CR I want to export the event stream
11
11
"""
12
12
And using identifier "default" , I define a content repository
13
13
And I am in content repository "default"
14
+ And the command CreateRootWorkspace is executed with payload:
15
+ | Key | Value |
16
+ | workspaceName | "live " |
17
+ | newContentStreamId | "cs -identifier " |
18
+ And I am in workspace "live"
14
19
15
20
Scenario : Import the event stream into a specific content stream
16
- Then I expect exactly 0 events to be published on stream with prefix "ContentStream:cs-identifier"
17
21
Given using the following events.jsonl:
18
22
"""
19
23
{"identifier":"9f64c281-e5b0-48d9-900b-288a8faf92a9","type":"RootNodeAggregateWithNodeWasCreated","payload":{"workspaceName":"workspace-name","contentStreamId":"cs-imported-identifier","nodeAggregateId":"acme-site-sites","nodeTypeName":"Neos.Neos:Sites","coveredDimensionSpacePoints":[[]],"nodeAggregateClassification":"root"},"metadata":[]}
20
24
{"identifier":"1640ebbf-7ffe-4526-b0f4-7575cefabfab","type":"NodeAggregateWithNodeWasCreated","payload":{"workspaceName":"workspace-name","contentStreamId":"cs-imported-identifier","nodeAggregateId":"acme-site","nodeTypeName":"Vendor.Site:HomePage","originDimensionSpacePoint":[],"succeedingSiblingsForCoverage":[{"dimensionSpacePoint":[],"nodeAggregateId":null}],"parentNodeAggregateId":"acme-site-sites","nodeName":"acme-site","initialPropertyValues":{"title":{"value":"My Site","type":"string"},"uriPathSegment":{"value":"my-site","type":"string"}},"nodeAggregateClassification":"regular"},"metadata":[]}
21
25
"""
22
- And I import the events.jsonl into "cs-identifier "
26
+ And I import the events.jsonl into workspace "live "
23
27
Then I expect exactly 3 events to be published on stream with prefix "ContentStream:cs-identifier"
24
28
And event at index 0 is of type "ContentStreamWasCreated" with payload:
25
29
| Key | Expected |
26
30
| contentStreamId | "cs -identifier " |
27
31
And event at index 1 is of type "RootNodeAggregateWithNodeWasCreated" with payload:
28
32
| Key | Expected |
29
- | workspaceName | "workspace - name " |
33
+ | workspaceName | "live " |
30
34
| contentStreamId | "cs -identifier " |
31
35
| nodeAggregateId | "acme -site -sites " |
32
36
| nodeTypeName | "Neos .Neos :Sites " |
33
37
And event at index 2 is of type "NodeAggregateWithNodeWasCreated" with payload:
34
38
| Key | Expected |
35
- | workspaceName | "workspace - name " |
39
+ | workspaceName | "live " |
36
40
| contentStreamId | "cs -identifier " |
37
41
| nodeAggregateId | "acme -site " |
38
42
| nodeTypeName | "Vendor .Site :HomePage " |
39
43
40
44
Scenario : Import the event stream
41
- Then I expect exactly 0 events to be published on stream with prefix "ContentStream:cs-imported-identifier"
42
45
Given using the following events.jsonl:
43
46
"""
44
47
{"identifier":"9f64c281-e5b0-48d9-900b-288a8faf92a9","type":"RootNodeAggregateWithNodeWasCreated","payload":{"workspaceName":"workspace-name","contentStreamId":"cs-imported-identifier","nodeAggregateId":"acme-site-sites","nodeTypeName":"Neos.Neos:Sites","coveredDimensionSpacePoints":[[]],"nodeAggregateClassification":"root"},"metadata":[]}
45
48
{"identifier":"1640ebbf-7ffe-4526-b0f4-7575cefabfab","type":"NodeAggregateWithNodeWasCreated","payload":{"workspaceName":"workspace-name","contentStreamId":"cs-imported-identifier","nodeAggregateId":"acme-site","nodeTypeName":"Vendor.Site:HomePage","originDimensionSpacePoint":[],"succeedingSiblingsForCoverage":[{"dimensionSpacePoint":[],"nodeAggregateId":null}],"parentNodeAggregateId":"acme-site-sites","nodeName":"acme-site","initialPropertyValues":{"title":{"value":"My Site","type":"string"},"uriPathSegment":{"value":"my-site","type":"string"}},"nodeAggregateClassification":"regular"},"metadata":[]}
46
49
"""
47
50
And I import the events.jsonl
48
- Then I expect exactly 3 events to be published on stream with prefix "ContentStream:cs-imported- identifier"
51
+ Then I expect exactly 3 events to be published on stream with prefix "ContentStream:cs-identifier"
49
52
And event at index 0 is of type "ContentStreamWasCreated" with payload:
50
- | Key | Expected |
51
- | contentStreamId | "cs -imported - identifier " |
53
+ | Key | Expected |
54
+ | contentStreamId | "cs -identifier " |
52
55
And event at index 1 is of type "RootNodeAggregateWithNodeWasCreated" with payload:
53
- | Key | Expected |
54
- | workspaceName | "workspace - name " |
55
- | contentStreamId | "cs -imported - identifier " |
56
- | nodeAggregateId | "acme -site -sites " |
57
- | nodeTypeName | "Neos .Neos :Sites " |
56
+ | Key | Expected |
57
+ | workspaceName | "live " |
58
+ | contentStreamId | "cs -identifier " |
59
+ | nodeAggregateId | "acme -site -sites " |
60
+ | nodeTypeName | "Neos .Neos :Sites " |
58
61
And event at index 2 is of type "NodeAggregateWithNodeWasCreated" with payload:
59
- | Key | Expected |
60
- | workspaceName | "workspace - name " |
61
- | contentStreamId | "cs -imported - identifier " |
62
- | nodeAggregateId | "acme -site " |
63
- | nodeTypeName | "Vendor .Site :HomePage " |
62
+ | Key | Expected |
63
+ | workspaceName | "live " |
64
+ | contentStreamId | "cs -identifier " |
65
+ | nodeAggregateId | "acme -site " |
66
+ | nodeTypeName | "Vendor .Site :HomePage " |
64
67
65
68
Scenario : Import faulty event stream with explicit "ContentStreamWasCreated" does not duplicate content-stream
66
69
see issue https://github.com/neos/neos-development-collection/issues/4298
@@ -73,7 +76,7 @@ Feature: As a user of the CR I want to export the event stream
73
76
"""
74
77
And I import the events.jsonl
75
78
76
- And I expect a MigrationError with the message
79
+ And I expect a migration exception with the message
77
80
"""
78
81
Failed to read events. ContentStreamWasCreated is not expected in imported event stream.
79
82
"""
0 commit comments