Skip to content
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

Testing framework: Throw an exception when -CASE is missing #1735

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions test/runner/e2e_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ void parseAndRegisterTestGroup(const std::string& path, bool generateTestList =
std::ofstream testList(TestHelper::getTestListFile(), std::ios_base::app);
testList << testGroup->group + "." + testCaseName + " " + path + "\n";
}
if (empty(testCaseName)) {
throw TestException("Missing test case name (-CASE) [" + path + "].");
}
testing::RegisterTest(testGroup->group.c_str(), testCaseName.c_str(), nullptr, nullptr,
__FILE__, __LINE__,
[datasetType, dataset, bufferPoolSize,
Expand Down
2 changes: 1 addition & 1 deletion test/test_files/exceptions/catalog/catalog.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

--

-CASE BindNonExistingFunction
-STATEMENT MATCH (a:person) RETURN dummy(n)
---- error
Catalog exception: DUMMY function does not exist.

-CASE BindNonExistingFunction
-STATEMENT MATCH (a:person) WHERE dummy() < 2 RETURN COUNT(*)
---- error
Catalog exception: DUMMY function does not exist.
Expand Down
2 changes: 2 additions & 0 deletions test/test_files/exceptions/copy/null_pk.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

--

-CASE NullPrimaryKey

-STATEMENT COPY person FROM "${KUZU_ROOT_DIRECTORY}/dataset/copy-fault-tests/null-pk/vPerson.csv"
---- error
Copy exception: Primary key cannot be null.
Loading