Skip to content

Commit

Permalink
TASK: Manipulate content graph manually for TetheredNodesAreNamed test
Browse files Browse the repository at this point in the history
otherwise it's basically impossible now to reproduce the state, as publishing an event will lead to the catchup's to run, which might instantiate a node:

the neos.neos `GraphProjectorCatchUpHookForCacheFlushingFactor` catchUpHook would fail for example:

> When the event NodeAggregateWithNodeWasCreated was published with payload:
> # Features/ProjectionIntegrityViolationDetection/TetheredNodesAreNamed.feature:41
> InvalidArgumentException: The NodeName must be set if the Node is tethered.
  • Loading branch information
mhsdesign committed Feb 2, 2024
1 parent 60bf327 commit cd8408c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,26 @@ public function iChangeTheFollowingHierarchyRelationsDimensionSpacePointHash(Tab
);
}

/**
* @When /^I change the following hierarchy relation's name:$/
* @param TableNode $payloadTable
* @throws DBALException
*/
public function iChangeTheFollowingHierarchyRelationsEdgeName(TableNode $payloadTable): void
{
$dataset = $this->transformPayloadTableToDataset($payloadTable);
$record = $this->transformDatasetToHierarchyRelationRecord($dataset);
unset($record['position']);

$this->dbalClient->getConnection()->update(
$this->getTableNamePrefix() . '_hierarchyrelation',
[
'name' => $dataset['newName']
],
$record
);
}

/**
* @When /^I set the following position:$/
* @param TableNode $payloadTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,16 @@ Feature: Run projection integrity violation detection regarding naming of tether
| originDimensionSpacePoint | {"language":"de"} |
| coveredDimensionSpacePoints | [{"language":"de"}] |
| parentNodeAggregateId | "sir-david-nodenborough" |
| nodeName | "to-be-hacked-to-null" |
| nodeAggregateClassification | "tethered" |
And the graph projection is fully up to date
And I change the following hierarchy relation's name:
| Key | Value |
| contentStreamId | "cs-identifier" |
| dimensionSpacePoint | {"language":"de"} |
| parentNodeAggregateId | "sir-david-nodenborough" |
| childNodeAggregateId | "nodewyn-tetherton" |
| newName | null |
And I run integrity violation detection
Then I expect the integrity violation detection result to contain exactly 1 errors
And I expect integrity violation detection result error number 1 to have code 1597923103

0 comments on commit cd8408c

Please sign in to comment.