MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / SetUp

Method SetUp

test/runner/e2e_test.cpp:28–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 connNames{connNames}, testPath{std::move(testPath)} {}
27
28 void SetUp() override {
29 setUpDataset();
30 BaseGraphTest::SetUp();
31 if (bufferPoolSize) {
32 systemConfig->bufferPoolSize = *bufferPoolSize;
33 }
34 bool generateBinaryDemo =
35 !std::getenv("USE_EXISTING_BINARY_DATASET") && dataset.ends_with("binary-demo");
36 if (datasetType == TestGroup::DatasetType::LBUG && dataset != "empty" &&
37 !generateBinaryDemo) {
38 std::filesystem::copy(dataset + "/" + TESTING_DB_FILE_NAME, databasePath);
39 }
40 createDB(checkpointWaitTimeout);
41 createConns(connNames);
42 if (datasetType == TestGroup::DatasetType::ICEBUG_DISK) {
43 // For ICEBUG_DISK, only run schema.cypher (which contains WITH storage = ... clauses)
44 // No copy.cypher needed as data is in external parquet files
45 lbug::main::Connection* connection =
46 conn ? conn.get() : (connMap.begin()->second).get();
47 TestHelper::executeScript(dataset + "/" + TestHelper::SCHEMA_FILE_NAME, *connection);
48 } else if (datasetType != TestGroup::DatasetType::LBUG && dataset != "empty") {
49 initGraph();
50 } else if (generateBinaryDemo && TestHelper::E2E_OVERRIDE_IMPORT_DIR.empty()) {
51 initGraph(TestHelper::appendLbugRootPath("dataset/demo-db/parquet/"));
52 } else if (generateBinaryDemo) {
53 initGraph(TestHelper::appendLbugRootPath(
54 TestHelper::E2E_OVERRIDE_IMPORT_DIR + "/demo-db/parquet/"));
55 }
56 }
57
58 void setUpDataset() {
59 switch (datasetType) {

Callers

nothing calls this directly

Calls 4

copyFunction · 0.50
getMethod · 0.45
beginMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected