for exportRelatedAssetIds, Don't create a version tag unless it's needed, and then don't restore it unless it exists. Otherwise, the tag leaks and breaks downstream tests.
This commit is contained in:
parent
f2b5f35d49
commit
1a462d4835
1 changed files with 2 additions and 3 deletions
|
|
@ -631,7 +631,7 @@ is(readlink $symlinkedRoot->stringify, $parentPath, 'exportSymlinkRoot sets up l
|
|||
unlink $symlinkedRoot->stringify;
|
||||
|
||||
subtest exportRelated => sub {
|
||||
my $old = WebGUI::VersionTag->getWorking($session);
|
||||
my $old = WebGUI::VersionTag->getWorking($session, 'noCreate');
|
||||
my $tag = WebGUI::VersionTag->create($session);
|
||||
$tag->setWorking();
|
||||
my $topic = $parent->addChild({
|
||||
|
|
@ -646,7 +646,7 @@ subtest exportRelated => sub {
|
|||
keywords => 'relatedAssetTesting',
|
||||
});
|
||||
$tag->commit();
|
||||
my $cleanup = guard { $old->setWorking(); $tag->rollback };
|
||||
my $cleanup = guard { $tag->rollback; if ($old) { $old->setWorking(); } };
|
||||
cmp_deeply(
|
||||
$archive->exportGetAssetIds({ depth => 99, exportRelated => 1}),
|
||||
superbagof(map { $_->getId } ($topic, $archive, $story)),
|
||||
|
|
@ -658,7 +658,6 @@ subtest exportRelated => sub {
|
|||
);
|
||||
};
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# exportGetDescendants()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue