8000 Completely export views dump restore by maierlars · Pull Request #6466 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Completely export views dump restore #6466

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

Merged
merged 14 commits into from
Sep 12, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added tests for view creation with links.
  • Loading branch information
lamai93 committed Sep 12, 2018
commit cdefefde097b75247fa8762b98b15d4d448d8c89
15 changes: 13 additions & 2 deletions tests/IResearch/IResearchView-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,19 @@ SECTION("test_defaults") {
REQUIRE((false == !logicalView));
std::set<TRI_voc_cid_t> cids;
logicalView->visitCollections([&cids](TRI_voc_cid_t cid)->bool { cids.emplace(cid); return true; });
CHECK((0 == cids.size()));
CHECK((true == logicalCollection->getIndexes().empty()));
CHECK((1 == cids.size()));
CHECK((false == logicalCollection->getIndexes().empty()));

arangodb::velocypack::Builder builder;

builder.openObject();
logicalView->toVelocyPack(builder, true, false);
builder.close();

auto slice = builder.slice();
auto tmpSlice = slice.get("links");
CHECK((true == tmpSlice.isObject() && 1 == tmpSlice.length()));
CHECK((true == tmpSlice.hasKey("testCollection")));
}

// view definition with links
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function IResearchLinkSuite () {
var meta = { links: { 'testCollection' : { includeAllFields: true } } };
var view = db._createView("badView", "arangosearch", meta);
var links = view.properties().links;
assertEqual(links['testCollection'], undefined);
assertNotEqual(links['testCollection'], undefined);
view.drop();
},

Expand All @@ -98,11 +98,7 @@ function IResearchLinkSuite () {
assertEqual(links['testCollection'], undefined);

view.drop();
try {
view = db._view('testView');
} catch (err) {
assertEqual(ERRORS.ERROR_VIEW_NOT_FOUND.code, err.errorNum);
}
assertNull(db._view('testView'));
}

};
Expand Down
12 changes: 2 additions & 10 deletions tests/js/common/shell/shell-view-arangosearch-noncluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,8 @@ function ViewSuite () {
assertEqual(propD.consolidationIntervalMsec, 3);
abc.drop();
def.drop();
try {
abc = db._view("abc");
} catch (err) {
assertEqual(ERRORS.ERROR_ARANGO_DATA_SOURCE_NOT_FOUND.code, err.errorNum);
}
try {
def = db._view("def");
} catch (err) {
assertEqual(ERRORS.ERROR_ARANGO_DATA_SOURCE_NOT_FOUND.code, err.errorNum);
}
assertNull(db._view("abc"));
assertNull(db._view("def"));
},

////////////////////////////////////////////////////////////////////////////
Expand Down
0