Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cppinttest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cppinttest
Commits
ea46e0e7
Verified
Commit
ea46e0e7
authored
1 year ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
TST: update tests for string ids
parent
c6b02f51
No related branches found
No related tags found
1 merge request
!31
Draft: Update tests for string ids
Pipeline
#41736
failed
1 year ago
Stage: info
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/test_select.cpp
+1
-3
1 addition, 3 deletions
test/test_select.cpp
test/test_transaction.cpp
+0
-21
0 additions, 21 deletions
test/test_transaction.cpp
with
1 addition
and
24 deletions
test/test_select.cpp
+
1
−
3
View file @
ea46e0e7
...
@@ -363,9 +363,7 @@ TEST_F(test_select, test_select_property_unit) {
...
@@ -363,9 +363,7 @@ TEST_F(test_select, test_select_property_unit) {
EXPECT_EQ
(
query_transaction
->
GetResultTable
().
size
(),
1
);
EXPECT_EQ
(
query_transaction
->
GetResultTable
().
size
(),
1
);
for
(
const
auto
&
row
:
query_transaction
->
GetResultTable
().
GetRows
())
{
for
(
const
auto
&
row
:
query_transaction
->
GetResultTable
().
GetRows
())
{
// Fails due to https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/issues/264
EXPECT_EQ
(
row
.
GetValue
(
"TestPropDouble.unit"
).
GetAsString
(),
"m"
);
EXPECT_NONFATAL_FAILURE
({
EXPECT_EQ
(
row
.
GetValue
(
"TestPropDouble.unit"
).
GetAsString
(),
"m"
);
},
"TestPropDouble.unit"
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
test/test_transaction.cpp
+
0
−
21
View file @
ea46e0e7
...
@@ -1328,25 +1328,4 @@ TEST_F(test_transaction, test_full_workflow) {
...
@@ -1328,25 +1328,4 @@ TEST_F(test_transaction, test_full_workflow) {
EXPECT_EQ
(
retr_transaction
->
GetResultSet
().
size
(),
1
);
EXPECT_EQ
(
retr_transaction
->
GetResultSet
().
size
(),
1
);
}
}
TEST_F
(
test_transaction
,
test_delete_string_id
)
{
const
auto
&
connection
=
caosdb
::
connection
::
ConnectionManager
::
GetDefaultConnection
();
auto
transaction
(
connection
->
CreateTransaction
());
transaction
->
DeleteById
(
"20"
);
transaction
->
DeleteById
(
"string"
);
transaction
->
DeleteById
(
"21"
);
transaction
->
ExecuteAsynchronously
();
transaction
->
WaitForIt
();
EXPECT_TRUE
(
transaction
->
GetStatus
().
IsTerminated
());
EXPECT_TRUE
(
transaction
->
GetStatus
().
IsError
());
const
auto
&
results
=
transaction
->
GetResultSet
();
EXPECT_FALSE
(
results
.
at
(
0
).
HasErrors
());
EXPECT_TRUE
(
results
.
at
(
1
).
HasErrors
());
EXPECT_EQ
(
results
.
at
(
1
).
GetErrors
().
size
(),
1
);
EXPECT_EQ
(
results
.
at
(
1
).
GetErrors
().
at
(
0
).
GetDescription
(),
"Entity does not exist."
);
EXPECT_FALSE
(
results
.
at
(
2
).
HasErrors
());
}
}
// namespace caosdb::transaction
}
// namespace caosdb::transaction
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment