generated from Sithas/conan_template
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12ca243c21 | |||
| 6cd277c754 | |||
| 69b97275a6 | |||
| 75a9e4cc14 | |||
| 40f8d48296 | |||
| d198317d4f | |||
| 9bd4187e9b | |||
| bff937f9a7 |
+120
-108
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.29.8)
|
||||
cmake_minimum_required(VERSION 3.28.3)
|
||||
project(UpAndDown)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
@@ -8,12 +8,14 @@ if (POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 OLD)
|
||||
endif ()
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
set(Boost_INCLUDE_DIR ${BOOST_ROOT})
|
||||
set(Boost_LIBRARY_DIR "${BOOST_ROOT}/stage/lib")
|
||||
|
||||
find_package(Boost 1.88.0 REQUIRED COMPONENTS filesystem json log system filesystem url)
|
||||
if (WIN32)
|
||||
set(Boost_INCLUDE_DIR ${BOOST_ROOT})
|
||||
set(Boost_LIBRARY_DIR "${BOOST_ROOT}/stage/lib")
|
||||
endif ()
|
||||
|
||||
find_package(Boost 1.88.0 REQUIRED COMPONENTS filesystem json log system url log_setup)
|
||||
if (Boost_FOUND)
|
||||
include_directories(${Boost_INCLUDE_DIR})
|
||||
endif ()
|
||||
@@ -23,55 +25,56 @@ find_package(mysql-concpp REQUIRED)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
add_executable(App ./src/main.cpp
|
||||
./src/helpers/helpers.h
|
||||
./src/helpers/helpers.cpp
|
||||
./src/endpoints_handlers/HandleRequest.h
|
||||
./src/endpoints_handlers/IController.h
|
||||
./src/endpoints_handlers/Controller.h
|
||||
./src/session/HttpSession.h
|
||||
./src/session/HttpSession.cpp
|
||||
./src/session/WebsocketSession.h
|
||||
./src/session/WebsocketSession.cpp
|
||||
./src/listener/Listener.h
|
||||
./src/listener/Listener.cpp
|
||||
./src/db/mysql_connector.cpp
|
||||
./src/db/mysql_connector.h
|
||||
./src/DAO/IUserDAO.h
|
||||
src/dtos/user_dto.h
|
||||
src/dtos/medication_dto.h
|
||||
./src/DAO/MySQLUserDAO.cpp
|
||||
./src/DAO/MySQLUserDAO.h
|
||||
./src/endpoints_handlers/IExecutor.h
|
||||
./src/endpoints_handlers/AuthRegistrationExecutor.h
|
||||
./src/endpoints_handlers/RootExecutor.h
|
||||
./src/DAO/IAuthDAO.h
|
||||
./src/DAO/MemoryAuthDAO.cpp
|
||||
./src/DAO/MemoryAuthDAO.h
|
||||
./src/endpoints_handlers/AuthLogoutExecutor.h
|
||||
./src/endpoints_handlers/AuthLoginExecutor.h
|
||||
./src/exceptions/session_exception.cpp
|
||||
./src/exceptions/session_exception.h
|
||||
src/log/Log.h
|
||||
src/log/Log.cpp
|
||||
tests/fixtures/AuthFixture.h
|
||||
src/endpoints_handlers/GetUserMedicationsExecutor.h
|
||||
src/DAO/IMedicationsDAO.h
|
||||
src/DAO/MySQLMedicationsDAO.h
|
||||
src/DAO/MySQLMedicationsDAO.cpp
|
||||
src/dtos/user_treatment_scheme_dto.h
|
||||
src/DAO/IUserTreatmentSchemesDAO.h
|
||||
src/DAO/MySQLUserTreatmentSchemesDAO.cpp
|
||||
src/DAO/MySQLUserTreatmentSchemesDAO.h
|
||||
src/endpoints_handlers/GetUserTreatmentSchemeExecutor.h
|
||||
src/endpoints_handlers/GetDiariesExecutor.h
|
||||
src/endpoints_handlers/PostDiaryExecutor.h
|
||||
src/endpoints_handlers/PutDiaryExecutor.h
|
||||
src/endpoints_handlers/DeleteDiaryExecutor.h
|
||||
src/DAO/IDiariesDAO.h
|
||||
src/dtos/diary_dto.h
|
||||
src/DAO/MySQLDiariesDao.cpp
|
||||
src/DAO/MySQLDiariesDao.h
|
||||
add_executable(App
|
||||
${CMAKE_SOURCE_DIR}/src/main.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.h
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/HandleRequest.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/IController.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/Controller.h
|
||||
${CMAKE_SOURCE_DIR}/src/session/HttpSession.h
|
||||
${CMAKE_SOURCE_DIR}/src/session/HttpSession.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/session/WebsocketSession.h
|
||||
${CMAKE_SOURCE_DIR}/src/session/WebsocketSession.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/listener/Listener.h
|
||||
${CMAKE_SOURCE_DIR}/src/listener/Listener.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/db/mysql_connector.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/db/mysql_connector.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/IUserDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/dtos/user_dto.h
|
||||
${CMAKE_SOURCE_DIR}/src/dtos/medication_dto.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/IExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/AuthRegistrationExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/RootExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/IAuthDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MemoryAuthDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MemoryAuthDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/AuthLogoutExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/AuthLoginExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/exceptions/session_exception.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/exceptions/session_exception.h
|
||||
${CMAKE_SOURCE_DIR}/src/log/Log.h
|
||||
${CMAKE_SOURCE_DIR}/src/log/Log.cpp
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/AuthFixture.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/GetUserMedicationsExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/IMedicationsDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLMedicationsDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLMedicationsDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/dtos/user_treatment_scheme_dto.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/IUserTreatmentSchemesDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserTreatmentSchemesDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserTreatmentSchemesDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/GetUserTreatmentSchemeExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/GetDiariesExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/PostDiaryExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/PutDiaryExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/DeleteDiaryExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/IDiariesDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/dtos/diary_dto.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLDiariesDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLDiariesDAO.h
|
||||
)
|
||||
|
||||
target_link_libraries(App PRIVATE Boost::boost
|
||||
@@ -80,6 +83,7 @@ target_link_libraries(App PRIVATE Boost::boost
|
||||
Boost::system
|
||||
Boost::filesystem
|
||||
Boost::url
|
||||
Boost::log_setup
|
||||
Threads::Threads
|
||||
mysql::concpp)
|
||||
|
||||
@@ -87,89 +91,97 @@ if (MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
|
||||
endif ()
|
||||
|
||||
add_executable(HelpersTests ./tests/helpers/helpers_TEST.cpp
|
||||
./src/helpers/helpers.h
|
||||
./src/helpers/helpers.cpp)
|
||||
add_executable(HelpersTests
|
||||
${CMAKE_SOURCE_DIR}/tests/helpers/helpers_TEST.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.h
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.cpp)
|
||||
target_link_libraries(HelpersTests PRIVATE Boost::boost Boost::json Boost::log)
|
||||
add_test(HelpersTests HelpersTests)
|
||||
|
||||
add_executable(ControllerTests ./tests/endpoint_handlers/Controller_TEST.cpp
|
||||
./src/endpoints_handlers/IController.h
|
||||
./src/endpoints_handlers/Controller.h)
|
||||
add_executable(ControllerTests
|
||||
${CMAKE_SOURCE_DIR}/tests/endpoint_handlers/Controller_TEST.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/IController.h
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/Controller.h)
|
||||
target_link_libraries(ControllerTests PRIVATE Boost::boost)
|
||||
add_test(ControllerTests ControllerTests)
|
||||
|
||||
add_executable(AuthRegistrationExecutorTests ./tests/endpoint_handlers/AuthRegistrationExecutor_TEST.cpp
|
||||
./src/endpoints_handlers/AuthRegistrationExecutor.h
|
||||
./src/exceptions/session_exception.cpp
|
||||
./src/exceptions/session_exception.h
|
||||
./src/helpers/helpers.h
|
||||
./src/helpers/helpers.cpp
|
||||
./src/DAO/MemoryAuthDAO.h
|
||||
./src/DAO/MemoryAuthDAO.cpp
|
||||
./src/DAO/MySQLUserDAO.h
|
||||
./src/DAO/MySQLUserDAO.cpp
|
||||
./src/db/mysql_connector.h
|
||||
./src/db/mysql_connector.cpp
|
||||
tests/fixtures/AuthFixture.h
|
||||
tests/fixtures/AuthFixture.cpp
|
||||
./tests/fixtures/fixture_session_initialization_helper.h
|
||||
./tests/fixtures/fixture_session_initialization_helper.cpp)
|
||||
add_executable(AuthRegistrationExecutorTests
|
||||
${CMAKE_SOURCE_DIR}/tests/endpoint_handlers/AuthRegistrationExecutor_TEST.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/AuthRegistrationExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/exceptions/session_exception.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/exceptions/session_exception.h
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.h
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MemoryAuthDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MemoryAuthDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/db/mysql_connector.h
|
||||
${CMAKE_SOURCE_DIR}/src/db/mysql_connector.cpp
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/AuthFixture.h
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/AuthFixture.cpp
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/fixture_session_initialization_helper.h
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/fixture_session_initialization_helper.cpp)
|
||||
target_link_libraries(AuthRegistrationExecutorTests PRIVATE Boost::boost
|
||||
Boost::json
|
||||
Boost::log
|
||||
Boost::system
|
||||
Boost::filesystem
|
||||
Boost::log_setup
|
||||
Threads::Threads
|
||||
mysql::concpp)
|
||||
add_test(AuthRegistrationExecutorTests AuthRegistrationExecutorTests)
|
||||
|
||||
add_executable(AuthLoginExecutorTests ./tests/endpoint_handlers/AuthLoginExecutor_TEST.cpp
|
||||
./src/endpoints_handlers/AuthRegistrationExecutor.h
|
||||
./src/exceptions/session_exception.cpp
|
||||
./src/exceptions/session_exception.h
|
||||
./src/helpers/helpers.h
|
||||
./src/helpers/helpers.cpp
|
||||
./src/DAO/MySQLUserDAO.h
|
||||
./src/DAO/MySQLUserDAO.cpp
|
||||
./src/DAO/MemoryAuthDAO.h
|
||||
./src/DAO/MemoryAuthDAO.cpp
|
||||
./src/db/mysql_connector.h
|
||||
./src/db/mysql_connector.cpp
|
||||
tests/fixtures/AuthFixture.h
|
||||
tests/fixtures/AuthFixture.cpp
|
||||
./tests/fixtures/fixture_session_initialization_helper.h
|
||||
./tests/fixtures/fixture_session_initialization_helper.cpp)
|
||||
add_executable(AuthLoginExecutorTests
|
||||
${CMAKE_SOURCE_DIR}/tests/endpoint_handlers/AuthLoginExecutor_TEST.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/AuthRegistrationExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/exceptions/session_exception.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/exceptions/session_exception.h
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.h
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MemoryAuthDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MemoryAuthDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/db/mysql_connector.h
|
||||
${CMAKE_SOURCE_DIR}/src/db/mysql_connector.cpp
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/AuthFixture.h
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/AuthFixture.cpp
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/fixture_session_initialization_helper.h
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/fixture_session_initialization_helper.cpp)
|
||||
target_link_libraries(AuthLoginExecutorTests PRIVATE Boost::boost
|
||||
Boost::json
|
||||
Boost::log
|
||||
Boost::system
|
||||
Boost::filesystem
|
||||
Boost::log_setup
|
||||
Threads::Threads
|
||||
mysql::concpp)
|
||||
add_test(AuthLoginExecutorTests AuthLoginExecutorTests)
|
||||
|
||||
add_executable(AuthLogoutExecutorTests ./tests/endpoint_handlers/AuthLogoutExecutor_TEST.cpp
|
||||
./src/endpoints_handlers/AuthRegistrationExecutor.h
|
||||
./src/exceptions/session_exception.cpp
|
||||
./src/exceptions/session_exception.h
|
||||
./src/helpers/helpers.h
|
||||
./src/helpers/helpers.cpp
|
||||
./src/DAO/MySQLUserDAO.h
|
||||
./src/DAO/MySQLUserDAO.cpp
|
||||
./src/DAO/MemoryAuthDAO.h
|
||||
./src/DAO/MemoryAuthDAO.cpp
|
||||
./src/db/mysql_connector.h
|
||||
./src/db/mysql_connector.cpp
|
||||
./tests/fixtures/AuthFixture.h
|
||||
./tests/fixtures/AuthFixture.cpp
|
||||
./tests/fixtures/fixture_session_initialization_helper.h
|
||||
./tests/fixtures/fixture_session_initialization_helper.cpp)
|
||||
add_executable(AuthLogoutExecutorTests
|
||||
${CMAKE_SOURCE_DIR}/tests/endpoint_handlers/AuthLogoutExecutor_TEST.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/endpoints_handlers/AuthRegistrationExecutor.h
|
||||
${CMAKE_SOURCE_DIR}/src/exceptions/session_exception.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/exceptions/session_exception.h
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.h
|
||||
${CMAKE_SOURCE_DIR}/src/helpers/helpers.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MySQLUserDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MemoryAuthDAO.h
|
||||
${CMAKE_SOURCE_DIR}/src/DAO/MemoryAuthDAO.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/db/mysql_connector.h
|
||||
${CMAKE_SOURCE_DIR}/src/db/mysql_connector.cpp
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/AuthFixture.h
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/AuthFixture.cpp
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/fixture_session_initialization_helper.h
|
||||
${CMAKE_SOURCE_DIR}/tests/fixtures/fixture_session_initialization_helper.cpp)
|
||||
target_link_libraries(AuthLogoutExecutorTests PRIVATE Boost::boost
|
||||
Boost::json
|
||||
Boost::log
|
||||
Boost::system
|
||||
Boost::filesystem
|
||||
Boost::log_setup
|
||||
Threads::Threads
|
||||
mysql::concpp)
|
||||
add_test(AuthLogoutExecutorTests AuthLogoutExecutorTests)
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ARG CONCPP_VER=9.4.0
|
||||
ARG CONCPP_TGZ=mysql-connector-c++-${CONCPP_VER}-linux-glibc2.28-x86-64bit.tar.gz
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates curl xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# MySQL xDevAPI install
|
||||
RUN curl -fsSL -o concpp.tgz \
|
||||
"https://dev.mysql.com/get/Downloads/Connector-C++/${CONCPP_TGZ}" \
|
||||
&& mkdir -p /opt \
|
||||
&& tar -xzf concpp.tgz -C /opt \
|
||||
&& rm concpp.tgz \
|
||||
&& found_dir="$(ls -1 /opt | grep -E '^mysql-connector-c\+\+-'"${CONCPP_VER}"'-')" \
|
||||
&& mv "/opt/${found_dir}" /opt/mysql-concpp
|
||||
|
||||
# CMake install
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
cmake build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Boost install
|
||||
RUN curl -L --retry 5 --retry-all-errors -o /tmp/boost.tar.gz "https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.gz" \
|
||||
&& ls -lh /tmp/boost.tar.gz \
|
||||
&& tar -tzf /tmp/boost.tar.gz >/dev/null
|
||||
|
||||
RUN mkdir -p /tmp/boost-src \
|
||||
&& tar -xzf /tmp/boost.tar.gz -C /tmp/boost-src --strip-components=1 \
|
||||
&& cd /tmp/boost-src \
|
||||
&& ./bootstrap.sh --prefix=/usr/local
|
||||
|
||||
RUN cd /tmp/boost-src \
|
||||
&& ./b2 -j"$(nproc)" install
|
||||
|
||||
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
|
||||
# Project copy
|
||||
WORKDIR /project
|
||||
# COPY . /project
|
||||
EXPOSE 8080
|
||||
|
||||
# Build & Run project
|
||||
CMD ["bash", "-lc", "\
|
||||
set -euo pipefail; \
|
||||
test -f /project/CMakeLists.txt; \
|
||||
mkdir -p /project/dist; \
|
||||
cmake -S /project -B /project/dist -Dmysql-concpp_DIR=/opt/mysql-concpp; \
|
||||
cmake --build /project/dist -j\"$(nproc)\"; \
|
||||
exec /project/dist/App 0.0.0.0 8080 . 12 mysqlx://root:root@host.docker.internal:33060 \
|
||||
"]
|
||||
@@ -1,3 +1,11 @@
|
||||
# Запуск(Без Docker):
|
||||
- cmake .. -DBOOST_ROOT=C:\Libs\boost_1_88_0 -Dmysql-concpp_DIR=C:\Libs\mysql_connector
|
||||
- cmake --build .
|
||||
|
||||
# Запуск(С Docker):
|
||||
- $env:DOCKER_BUILDKIT=1; docker build --progress=plain -t up_and_down .
|
||||
- docker run --rm -v //c/CLionProjects/UpAndDown:/project -p 8080:8080 up_and_down
|
||||
|
||||
# TODO:
|
||||
|
||||
- ~~Сделать реальные исполнители(executors) для регистрации, авторизации, логаута~~
|
||||
@@ -21,17 +29,22 @@
|
||||
- Посмотреть пулл соединений(Object pool) при использовании базы данных(посмотреть api MySQL-Connector)
|
||||
- Посмотреть и подумать, что лучше - корутины или многопоточность?
|
||||
- UseCase'ы по работе с личным кабинетом
|
||||
- Научиться поднимать базы данных под каждый тест - научиться Docker - docker-compose - а если тест что-то должен заполнить, то он заполняет в самом начале()
|
||||
- Возможно, сделать тесты на CI/CD - приоритет - низкий
|
||||
- Найти слабые места в C++ -- std::forward, universal reference, просмотреть про decltype(почитать статьи)
|
||||
- Написать фронтенд для MVP
|
||||
- Разобрать decltype и auto по статье
|
||||
- ~~Разобрать decltype и auto по статье~~
|
||||
- Подготовить резюме для тестовых собесов
|
||||
- DockerHosting.ru - купить аренду после того, как будет готов фронт и бэк
|
||||
До 27.01.2026
|
||||
- ~~Подобрать сервер по параметрам. Использовать linux.~~ DockerHosting.ru
|
||||
- ~~Подобрать сервер по параметрам. Использовать linux.~~
|
||||
- ~~Перевести string на string_view~~
|
||||
- ~~Попробовать nodiscard к executoru~~
|
||||
- ~~Добить 2 ручки~~
|
||||
- Сделать тесты для ручек
|
||||
До 10.02.2026
|
||||
- Сделать 2-3 теста
|
||||
- Продвинуться по фронтенду(форма авторизации и логина)
|
||||
- Сделать Dockerfile & Docker-compose(очищать и заполнять базу после каждого тест-кейса)
|
||||
- Возможно, сделать тесты на CI/CD - приоритет - низкий
|
||||
- Научиться поднимать базы данных под каждый тест - научиться Docker - docker-compose - а если тест что-то должен заполнить, то он заполняет в самом начале
|
||||
- Проставить const на немутабельные объекты
|
||||
|
||||
# План
|
||||
1)Добить бэкенд(2 ручки) (до февраля)
|
||||
|
||||
@@ -143,7 +143,7 @@ void MySqlDiariesDAO::UpdateDiary(
|
||||
diary_uuid.data()
|
||||
);
|
||||
|
||||
auto res = stmt.execute();
|
||||
const auto res = stmt.execute();
|
||||
|
||||
if (res.getAffectedItemsCount() == 0) {
|
||||
throw session_exception(boost::beast::http::status::not_found, "Diary not found");
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "./../DAO/IDiariesDao.h"
|
||||
#include "./../DAO/IDiariesDAO.h"
|
||||
#include "./../db/mysql_connector.h"
|
||||
|
||||
namespace uad
|
||||
|
||||
@@ -4,7 +4,7 @@ using namespace std;
|
||||
|
||||
namespace uad
|
||||
{
|
||||
char const* session_exception::what() const
|
||||
char const* session_exception::what() const noexcept
|
||||
{
|
||||
return message.c_str();
|
||||
}
|
||||
|
||||
@@ -15,6 +15,6 @@ struct session_exception : std::exception
|
||||
session_exception(const boost::beast::http::status ec, const std::string info)
|
||||
: code(ec), comment(info), message(std::to_string(static_cast<uint64_t>(ec)) + " - " + comment)
|
||||
{}
|
||||
char const* what() const override;
|
||||
[[nodiscard]] char const* what() const noexcept override;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/log/utility/setup/file.hpp>
|
||||
#include <boost/log/utility/setup/common_attributes.hpp>
|
||||
|
||||
@@ -51,12 +51,12 @@ BOOST_AUTO_TEST_CASE(Should_Be_Initiated_With_Unordered_Map_HTTP_Methods_To_Exec
|
||||
{
|
||||
IControllerMock::HTTPMethodsToExecutors executors;
|
||||
|
||||
executors[beast::http::verb::get] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::post] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::put] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::delete_] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::head] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::options] = make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::get] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::post] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::put] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::delete_] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::head] = std::make_shared<MockExecutor>();
|
||||
executors[beast::http::verb::options] = std::make_shared<MockExecutor>();
|
||||
|
||||
IControllerMock my_controller(std::move(executors));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user