-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUGFIX 4298 content stream creation deduplication #4674
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5448a6a
4298 - prevent content stream creation event duplication
3ab8b39
4298 - add test case for CrCommandController
377792b
Merge branch '9.0' into 4298-contentStreamCreationDeduplication
26be24b
Merge branch '9.0' into 4298-contentStreamCreationDeduplication
0205d0d
4298 - remove obsolete insert ignore
21a17b4
4298 - remove obsolete test case
5f1d14d
Merge remote-tracking branch 'origin/9.0' into 4298-contentStreamCrea…
mhsdesign File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
Neos.Neos/Tests/Functional/Command/CrCommandControllerTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Neos.Neos package. | ||
* | ||
* (c) Contributors of the Neos Project - www.neos.io | ||
* | ||
* This package is Open Source Software. For the full copyright and license | ||
* information, please view the LICENSE file which was distributed with this | ||
* source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\Neos\Tests\Functional\Command; | ||
|
||
use Neos\ContentRepository\Core\Factory\ContentRepositoryId; | ||
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; | ||
use Neos\Flow\Tests\FunctionalTestCase; | ||
use Neos\Neos\Command\CrCommandController; | ||
use Neos\Utility\Arrays; | ||
|
||
class CrCommandControllerTest extends FunctionalTestCase | ||
{ | ||
private CrCommandController $subject; | ||
|
||
private ContentRepositoryRegistry $contentRepositoryRegistry; | ||
|
||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->subject = $this->objectManager->get(CrCommandController::class); | ||
$this->contentRepositoryRegistry = $this->objectManager->get(ContentRepositoryRegistry::class); | ||
} | ||
|
||
public function testImportThenExport() | ||
{ | ||
$this->contentRepositoryRegistry->get(ContentRepositoryId::fromString('default'))->setUp(); | ||
$sourcePath = __DIR__ . '/../Fixtures'; | ||
$this->subject->importCommand($sourcePath); | ||
$targetPath = FLOW_PATH_DATA . 'Temporary'; | ||
$this->subject->exportCommand($targetPath); | ||
|
||
$expectedEvents = Arrays::trimExplode("\n", file_get_contents($sourcePath. '/events.jsonl')); | ||
$actualEvents = Arrays::trimExplode("\n", file_get_contents($targetPath. '/events.jsonl')); | ||
|
||
self::assertSame(count($expectedEvents), count($actualEvents)); | ||
mhsdesign marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"identifier":"5f2da12d-7037-4524-acb0-d52037342c77","type":"ContentStreamWasCreated","payload":{"contentStreamId":"6ea2f6e1-4c9c-44f9-8a86-991705d13770"},"metadata":[]} | ||
{"identifier":"9f64c281-e5b0-48d9-900b-288a8faf92a9","type":"RootNodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"6ea2f6e1-4c9c-44f9-8a86-991705d13770","nodeAggregateId":"acme-site-sites","nodeTypeName":"Neos.Neos:Sites","coveredDimensionSpacePoints":[[]],"nodeAggregateClassification":"root"},"metadata":[]} | ||
{"identifier":"1640ebbf-7ffe-4526-b0f4-7575cefabfab","type":"NodeAggregateWithNodeWasCreated","payload":{"contentStreamId":"6ea2f6e1-4c9c-44f9-8a86-991705d13770","nodeAggregateId":"acme-site","nodeTypeName":"Neos.Neos:Site","originDimensionSpacePoint":[],"coveredDimensionSpacePoints":[[]],"parentNodeAggregateId":"acme-site-sites","nodeName":"acme-site","initialPropertyValues":{"title":{"value":"My Site","type":"string"},"uriPathSegment":{"value":"my-site","type":"string"}},"nodeAggregateClassification":"regular","succeedingNodeAggregateId":null},"metadata":[]} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably be extracted into a separate change?