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
7efed25f
Verified
Commit
7efed25f
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' into f-conan2
parents
8589634d
0560124d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#9645
failed
3 years ago
Stage: info
Stage: setup
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.docker/Dockerfile
+1
-2
1 addition, 2 deletions
.docker/Dockerfile
.gitlab-ci.yml
+2
-22
2 additions, 22 deletions
.gitlab-ci.yml
test/test_connection.cpp
+8
-9
8 additions, 9 deletions
test/test_connection.cpp
with
11 additions
and
33 deletions
.docker/Dockerfile
+
1
−
2
View file @
7efed25f
...
...
@@ -7,7 +7,6 @@ COPY .docker/wait-for-it.sh /wait-for-it.sh
WORKDIR
/libcaosdb/
RUN
mkdir
build
WORKDIR
/libcaosdb/build
RUN
conan
install
..
RUN
cmake ..
RUN
cmake
--build
.
RUN
cmake
--install
.
--prefix
/usr/local/
...
...
@@ -24,4 +23,4 @@ CMD mkdir build && \
cmake -D CMAKE_PREFIX_PATH=/usr/local/ .. && \
cmake --build . && \
/wait-for-it.sh caosdb-server:10443 -t 500 -- \
ctest
ctest
-V
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
2
−
22
View file @
7efed25f
...
...
@@ -66,7 +66,7 @@ info:
# Build a docker image in which tests for this repository can run
.
build-testenv
:
&build-testenv
build-testenv
:
&build-testenv
tags
:
[
cached-dind
]
image
:
docker:20.10.6
stage
:
setup
...
...
@@ -100,26 +100,6 @@ info:
-
docker push $CPPINTTEST_REGISTRY_IMAGE
-
docker save $CPPINTTEST_REGISTRY_IMAGE > /image-cache/${CPPINTTEST_IMAGE_CACHE}
build-testenv-changes-docker
:
<<
:
*build-testenv
only
:
changes
:
-
.docker/*
except
:
refs
:
-
pipeline
-
schedules
-
web
build-testenv-triggered
:
<<
:
*build-testenv
only
:
refs
:
-
pipeline
-
schedules
-
web
# build integration tests
build-test
:
...
...
@@ -180,7 +160,7 @@ test:
# store versions of CaosDB parts
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_server_commit | tee hash_server
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_mysqlbackend_commit | tee hash_mysql
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_proto_commit | tee hash_
server
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_proto_commit | tee hash_
proto
# the pyinttest docker writes the return value of the tests into the
# file result
...
...
This diff is collapsed.
Click to expand it.
test/test_connection.cpp
+
8
−
9
View file @
7efed25f
...
...
@@ -50,10 +50,11 @@ TEST(test_connection, connect_somehost_42347_fails) {
auto
config
=
std
::
make_shared
<
InsecureCaosDBConnectionConfig
>
(
host
,
port
);
CaosDBConnection
connection
(
config
);
// TODO ConnectionError
ASSERT_THROW
(
connection
.
getVersionInfo
(),
std
::
runtime_error
);
}
TEST
(
test_connection
,
connection_
caosdb_server_insecure_success
)
{
TEST
(
test_connection
,
connection_
insecure_authentication_error
)
{
auto
port
=
8080
;
const
auto
host
=
caosdb
::
utils
::
get_env_var
(
"CAOSDB_SERVER_HOST"
,
"localhost"
);
auto
major
=
0
;
...
...
@@ -62,12 +63,11 @@ TEST(test_connection, connection_caosdb_server_insecure_success) {
auto
config
=
std
::
make_shared
<
InsecureCaosDBConnectionConfig
>
(
host
,
port
);
auto
connection
=
CaosDBConnection
(
config
);
auto
v_info
=
connection
.
getVersionInfo
();
ASSERT_EQ
(
major
,
v_info
.
major
());
ASSERT_EQ
(
minor
,
v_info
.
minor
());
// TODO AuthenticationError
ASSERT_THROW
(
connection
.
getVersionInfo
(),
std
::
runtime_error
);
}
TEST
(
test_connection
,
connection_
caosdb_server_ssl_success
)
{
TEST
(
test_connection
,
connection_
ssl_authentication_error
)
{
auto
port
=
8443
;
const
auto
host
=
caosdb
::
utils
::
get_env_var
(
"CAOSDB_SERVER_HOST"
,
"localhost"
);
const
auto
path
=
caosdb
::
utils
::
get_env_var
(
"CAOSDB_SERVER_CA_PEM"
,
std
::
string
());
...
...
@@ -78,12 +78,11 @@ TEST(test_connection, connection_caosdb_server_ssl_success) {
auto
config
=
std
::
make_shared
<
SslCaosDBConnectionConfig
>
(
host
,
port
,
ssloptions
);
auto
connection
=
CaosDBConnection
(
config
);
auto
v_info
=
connection
.
getVersionInfo
();
ASSERT_EQ
(
major
,
v_info
.
major
());
ASSERT_EQ
(
minor
,
v_info
.
minor
());
// TODO AuthenticationError
ASSERT_THROW
(
connection
.
getVersionInfo
(),
std
::
runtime_error
);
}
TEST
(
test_connection
,
connection_
with
_authentication_success
)
{
TEST
(
test_connection
,
connection_
ssl
_authentication_success
)
{
auto
port
=
8443
;
const
auto
host
=
caosdb
::
utils
::
get_env_var
(
"CAOSDB_SERVER_HOST"
,
"localhost"
);
const
auto
path
=
caosdb
::
utils
::
get_env_var
(
"CAOSDB_SERVER_CA_PEM"
,
std
::
string
());
...
...
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