1
0
Fork 0

[3.4] Added a regression test for arangodb/backlog#486 (#6791)

* Added a regression test for arangodb/backlog#486

* Moved regression test in existing ddl test files
This commit is contained in:
Tobias Gödderz 2018-10-11 15:23:37 +02:00 committed by Andrey Abramov
parent 6d99916f84
commit 351a10a547
2 changed files with 46 additions and 0 deletions

View File

@ -739,6 +739,29 @@ function IResearchFeatureDDLTestSuite () {
});
},
////////////////////////////////////////////////////////////////////////////
/// @brief test create & drop of a view with a link.
/// Regression test for arangodb/backlog#486.
////////////////////////////////////////////////////////////////////////////
testCreateAndDropViewWithLink: function () {
const colName = 'TestCollection';
const viewName = 'TestView';
db._drop(colName);
db._dropView(viewName);
const col = db._create(colName);
for (let i = 0; i < 10; i++) {
col.insert({ i });
}
{
const view = db._createView(viewName, 'arangosearch', {});
view.properties({ links: { [colName]: { includeAllFields: true } } });
db._dropView(viewName);
} // forget variable `view`, it's invalid now
assertEqual(db[viewName], undefined);
},
};
}

View File

@ -639,6 +639,29 @@ function IResearchFeatureDDLTestSuite () {
});
},
////////////////////////////////////////////////////////////////////////////
/// @brief test create & drop of a view with a link.
/// Regression test for arangodb/backlog#486.
////////////////////////////////////////////////////////////////////////////
testCreateAndDropViewWithLink: function () {
const colName = 'TestCollection';
const viewName = 'TestView';
db._drop(colName);
db._dropView(viewName);
const col = db._create(colName);
for (let i = 0; i < 10; i++) {
col.insert({ i });
}
{
const view = db._createView(viewName, 'arangosearch', {});
view.properties({ links: { [colName]: { includeAllFields: true } } });
db._dropView(viewName);
} // forget variable `view`, it's invalid now
assertEqual(db[viewName], undefined);
},
};
}