Skip to content
Snippets Groups Projects
Verified Commit 7efed25f authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'main' into f-conan2

parents 8589634d 0560124d
Branches
Tags
No related merge requests found
Pipeline #9645 failed
...@@ -7,7 +7,6 @@ COPY .docker/wait-for-it.sh /wait-for-it.sh ...@@ -7,7 +7,6 @@ COPY .docker/wait-for-it.sh /wait-for-it.sh
WORKDIR /libcaosdb/ WORKDIR /libcaosdb/
RUN mkdir build RUN mkdir build
WORKDIR /libcaosdb/build WORKDIR /libcaosdb/build
RUN conan install ..
RUN cmake .. RUN cmake ..
RUN cmake --build . RUN cmake --build .
RUN cmake --install . --prefix /usr/local/ RUN cmake --install . --prefix /usr/local/
...@@ -24,4 +23,4 @@ CMD mkdir build && \ ...@@ -24,4 +23,4 @@ CMD mkdir build && \
cmake -D CMAKE_PREFIX_PATH=/usr/local/ .. && \ cmake -D CMAKE_PREFIX_PATH=/usr/local/ .. && \
cmake --build . && \ cmake --build . && \
/wait-for-it.sh caosdb-server:10443 -t 500 -- \ /wait-for-it.sh caosdb-server:10443 -t 500 -- \
ctest ctest -V
...@@ -66,7 +66,7 @@ info: ...@@ -66,7 +66,7 @@ info:
# Build a docker image in which tests for this repository can run # Build a docker image in which tests for this repository can run
.build-testenv: &build-testenv build-testenv: &build-testenv
tags: [cached-dind] tags: [cached-dind]
image: docker:20.10.6 image: docker:20.10.6
stage: setup stage: setup
...@@ -100,26 +100,6 @@ info: ...@@ -100,26 +100,6 @@ info:
- docker push $CPPINTTEST_REGISTRY_IMAGE - docker push $CPPINTTEST_REGISTRY_IMAGE
- docker save $CPPINTTEST_REGISTRY_IMAGE > /image-cache/${CPPINTTEST_IMAGE_CACHE} - 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 integration tests
build-test: build-test:
...@@ -180,7 +160,7 @@ test: ...@@ -180,7 +160,7 @@ test:
# store versions of CaosDB parts # 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_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_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 # the pyinttest docker writes the return value of the tests into the
# file result # file result
......
...@@ -50,10 +50,11 @@ TEST(test_connection, connect_somehost_42347_fails) { ...@@ -50,10 +50,11 @@ TEST(test_connection, connect_somehost_42347_fails) {
auto config = std::make_shared<InsecureCaosDBConnectionConfig>(host, port); auto config = std::make_shared<InsecureCaosDBConnectionConfig>(host, port);
CaosDBConnection connection(config); CaosDBConnection connection(config);
// TODO ConnectionError
ASSERT_THROW(connection.getVersionInfo(), std::runtime_error); 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; auto port = 8080;
const auto host = caosdb::utils::get_env_var("CAOSDB_SERVER_HOST", "localhost"); const auto host = caosdb::utils::get_env_var("CAOSDB_SERVER_HOST", "localhost");
auto major = 0; auto major = 0;
...@@ -62,12 +63,11 @@ TEST(test_connection, connection_caosdb_server_insecure_success) { ...@@ -62,12 +63,11 @@ TEST(test_connection, connection_caosdb_server_insecure_success) {
auto config = std::make_shared<InsecureCaosDBConnectionConfig>(host, port); auto config = std::make_shared<InsecureCaosDBConnectionConfig>(host, port);
auto connection = CaosDBConnection(config); auto connection = CaosDBConnection(config);
auto v_info = connection.getVersionInfo(); // TODO AuthenticationError
ASSERT_EQ(major, v_info.major()); ASSERT_THROW(connection.getVersionInfo(), std::runtime_error);
ASSERT_EQ(minor, v_info.minor());
} }
TEST(test_connection, connection_caosdb_server_ssl_success) { TEST(test_connection, connection_ssl_authentication_error) {
auto port = 8443; auto port = 8443;
const auto host = caosdb::utils::get_env_var("CAOSDB_SERVER_HOST", "localhost"); 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()); 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) { ...@@ -78,12 +78,11 @@ TEST(test_connection, connection_caosdb_server_ssl_success) {
auto config = std::make_shared<SslCaosDBConnectionConfig>(host, port, ssloptions); auto config = std::make_shared<SslCaosDBConnectionConfig>(host, port, ssloptions);
auto connection = CaosDBConnection(config); auto connection = CaosDBConnection(config);
auto v_info = connection.getVersionInfo(); // TODO AuthenticationError
ASSERT_EQ(major, v_info.major()); ASSERT_THROW(connection.getVersionInfo(), std::runtime_error);
ASSERT_EQ(minor, v_info.minor());
} }
TEST(test_connection, connection_with_authentication_success) { TEST(test_connection, connection_ssl_authentication_success) {
auto port = 8443; auto port = 8443;
const auto host = caosdb::utils::get_env_var("CAOSDB_SERVER_HOST", "localhost"); 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()); const auto path = caosdb::utils::get_env_var("CAOSDB_SERVER_CA_PEM", std::string());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment