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
No related branches found
No related tags found
No related merge requests found
Pipeline #9645 failed
......@@ -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
......@@ -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
......
......@@ -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());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment