diff --git a/.github/workflows/build-test-check.yml b/.github/workflows/build-test-check.yml new file mode 100644 index 0000000..ac4d667 --- /dev/null +++ b/.github/workflows/build-test-check.yml @@ -0,0 +1,80 @@ +name: CI Build and Test + +on: + pull_request: + branches: [main, develop] + +jobs: + build-and-test: + strategy: + matrix: + config: + - name: "Release" + build_type: "Release" + conan_profile: "Release" + cmake_preset: "unix-rel-ninja" # Will be modified for shared + - name: "Debug" + build_type: "Debug" + conan_profile: "Debug" + cmake_preset: "unix-deb-ninja" # Will be modified for shared + + runs-on: ubuntu-latest + name: ${{ matrix.config.name }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install Clang 19 + run: | + sudo apt-get update + sudo apt-get install -y clang-19 ninja-build + + - name: Configure with Clang 19 + run: | + export CC=clang-19 + export CXX=clang++-19 + + - name: Install Conan + run: | + python -m pip install --upgrade pip + pip install conan + + - name: Configure Conan + run: | + conan profile detect --force + conan profile show + + - name: Install dependencies with Conan + run: | + conan install . -s build_type=${{ matrix.config.conan_profile }} -of=conan/${{ matrix.config.build_type == 'Debug' && 'debug' || 'release' }} --build=missing + + - name: Configure CMake + run: | + export PATH="/usr/bin:$PATH" + cmake --preset ${{ matrix.config.cmake_preset }} -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja + + - name: Build project + run: | + cmake --build --preset ${{ matrix.config.build_type == 'Debug' && 'unix-deb-ninja' || 'unix-rel-ninja' }} --config ${{ matrix.config.build_type }} + + - name: Run tests + if: ${{ matrix.config.build_type == 'Debug' }} + run: | + cd build/${{ matrix.config.cmake_preset }}/tests + ctest -C ${{ matrix.config.build_type }} --output-on-failure + + - name: Upload build artifacts (on failure) + if: failure() + uses: actions/upload-artifact@v4 + with: + name: build-logs-${{ matrix.config.name }} + path: | + build/ + !build/**/CMakeFiles/ + retention-days: 7 diff --git a/.vscode/tasks.json b/.vscode/tasks.json index bd55ffb..4798f9b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,7 +2,7 @@ "version": "2.0.0", "tasks": [ { - "label": "Run Server (Static)", + "label": "Run Server Debug (Static)", "type": "shell", "command": "./bankid_server.exe", "options": { @@ -12,7 +12,7 @@ "isBackground": true }, { - "label": "Run Server (Shared)", + "label": "Run Server Debug (Shared)", "type": "shell", "command": "./bankid_server.exe", "group": "test", @@ -22,7 +22,27 @@ "isBackground": true }, { - "label": "Run Tests (Static)", + "label": "Run Server Release (Static)", + "type": "shell", + "command": "./bankid_server.exe", + "options": { + "cwd": "${workspaceFolder}/build/vs2022-rel/server/Release" + }, + "group": "test", + "isBackground": true + }, + { + "label": "Run Server Release (Shared)", + "type": "shell", + "command": "./bankid_server.exe", + "group": "test", + "options": { + "cwd": "${workspaceFolder}/build/vs2022-rel-shared/server/Release" + }, + "isBackground": true + }, + { + "label": "Run Tests Debug (Static)", "type": "shell", "command": "./bankid_tests.exe", "options": { @@ -33,7 +53,7 @@ "problemMatcher": [] }, { - "label": "Run Tests (Shared)", + "label": "Run Tests Debug (Shared)", "type": "shell", "command": "./bankid_tests.exe", "options": { diff --git a/CMakeLists.txt b/CMakeLists.txt index 62b07f9..07385e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ endif() option(BUILD_SHARED_LIBS "Build shared library" Off) -option(BUILD_TESTS "Build tests" On) +# option(BUILD_TESTS "Build tests" On) add_subdirectory(bankid) add_subdirectory(server) diff --git a/CMakePresets.json b/CMakePresets.json index bcd5289..3ec9b69 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -8,6 +8,27 @@ "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/conan/debug/build/generators/conan_toolchain.cmake" } }, + { + "name": "conan-deb-unix", + "hidden": true, + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/conan/debug/build/Debug/generators/conan_toolchain.cmake" + } + }, + { + "name": "conan-rel", + "hidden": true, + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/conan/release/build/generators/conan_toolchain.cmake" + } + }, + { + "name": "conan-rel-unix", + "hidden": true, + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/conan/release/build/Release/generators/conan_toolchain.cmake" + } + }, { "name": "rel", "hidden": true, @@ -28,35 +49,16 @@ "CMAKE_EXPORT_COMPILE_COMMANDS": true } }, - { - "name": "unix-make", - "hidden": true, - "generator": "Unix Makefiles", - "cacheVariables": { - "CMAKE_CXX_COMPILER": "g++", - "CMAKE_C_COMPILER": "gcc", - "CMAKE_CXX_FLAGS_INIT": "$env{CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -pedantic" - } - }, { "name": "unix-ninja", "hidden": true, "generator": "Ninja", "cacheVariables": { - "CMAKE_C_COMPILER": "clang-17", - "CMAKE_CXX_COMPILER": "clang++-17", + "CMAKE_CXX_COMPILER": "clang++-19", + "CMAKE_C_COMPILER": "clang-19", "CMAKE_CXX_FLAGS_INIT": "$env{CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -pedantic" } }, - { - "name": "unix-shared", - "hidden": true, - "inherits": "unix-make", - "cacheVariables": { - "CMAKE_CXX_FLAGS_INIT": "$env{CMAKE_CXX_FLAGS_INIT} $env{CMAKE_CXX_FLAGS} -fPIC -Werror -Wall -Wextra -pedantic", - "BUILD_SHARED_LIBS": true - } - }, { "name": "vs2022", "hidden": true, @@ -74,68 +76,42 @@ "BUILD_SHARED_LIBS": true } }, - - { - "name": "unix-rel", - "displayName": "Unix Make Release", - "binaryDir": "${sourceDir}/build/unix-rel", - "inherits": ["unix-make", "rel"], - "cacheVariables": { - "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/unix-rel/install" - } - }, { "name": "unix-rel-ninja", "displayName": "Unix Ninja Clang Release", "binaryDir": "${sourceDir}/build/unix-rel-ninja", - "inherits": ["unix-ninja", "rel"], + "inherits": [ + "unix-ninja", + "rel", + "conan-rel-unix" + ], "cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/unix-rel-ninja/install" } }, - { - "name": "unix-rel-shared", - "displayName": "Unix Make Release Shared", - "binaryDir": "${sourceDir}/build/unix-rel-shared", - "inherits": ["unix-shared", "unix-rel"], - "cacheVariables": { - "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/unix-rel-shared/install" - } - }, - { - "name": "unix-deb", - "displayName": "Unix Make Debug", - "binaryDir": "${sourceDir}/build/unix-deb", - "inherits": ["unix-make", "deb", "conan-deb"], - "cacheVariables": { - "CMAKE_CXX_FLAGS": "-O0 --coverage -g -fsanitize=address", - "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/unix-deb/install" - } - }, { "name": "unix-deb-ninja", "displayName": "Unix Ninja Clang Debug", "binaryDir": "${sourceDir}/build/unix-deb-ninja", - "inherits": ["unix-ninja", "deb", "conan-deb"], + "inherits": [ + "unix-ninja", + "deb", + "conan-deb-unix" + ], "cacheVariables": { "CMAKE_CXX_FLAGS": "-O0 --coverage -g -fsanitize=address", "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/unix-deb-ninja/install" } }, - { - "name": "unix-deb-shared", - "displayName": "Unix Make Debug Shared", - "binaryDir": "${sourceDir}/build/unix-deb-shared", - "inherits": ["unix-shared", "unix-deb"], - "cacheVariables": { - "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/unix-deb-shared/install" - } - }, { "name": "vs2022-rel", "displayName": "Visual Studio 2022 Release", "binaryDir": "${sourceDir}/build/vs2022-rel", - "inherits": ["vs2022", "rel"], + "inherits": [ + "vs2022", + "rel", + "conan-rel" + ], "cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/vs2022-rel/install" } @@ -144,7 +120,11 @@ "name": "vs2022-deb", "displayName": "Visual Studio 2022 Debug", "binaryDir": "${sourceDir}/build/vs2022-deb", - "inherits": ["vs2022", "deb", "conan-deb"], + "inherits": [ + "vs2022", + "deb", + "conan-deb" + ], "cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/vs2022-deb/install" } @@ -153,7 +133,11 @@ "name": "vs2022-rel-shared", "displayName": "Visual Studio 2022 Release Shared", "binaryDir": "${sourceDir}/build/vs2022-rel-shared", - "inherits": ["vs2022-shared", "rel"], + "inherits": [ + "vs2022-shared", + "rel", + "conan-rel" + ], "cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/vs2022-rel/install" } @@ -162,7 +146,11 @@ "name": "vs2022-deb-shared", "displayName": "Visual Studio 2022 Debug Shared", "binaryDir": "${sourceDir}/build/vs2022-deb-shared", - "inherits": ["vs2022-shared", "deb", "conan-deb"], + "inherits": [ + "vs2022-shared", + "deb", + "conan-deb" + ], "cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/vs2022-rel/install" } @@ -193,41 +181,17 @@ "configurePreset": "vs2022-deb-shared", "configuration": "Debug" }, - { - "name": "unix-deb", - "displayName": "Unix Make Debug Build", - "configurePreset": "unix-deb", - "configuration": "Debug" - }, { "name": "unix-deb-ninja", "displayName": "Unix Ninja Debug Build", "configurePreset": "unix-deb-ninja", "configuration": "Debug" }, - { - "name": "unix-deb-shared", - "displayName": "Unix Make Debug Build", - "configurePreset": "unix-deb-shared", - "configuration": "Debug" - }, - { - "name": "unix-rel", - "displayName": "Unix Make Release Build", - "configurePreset": "unix-rel", - "configuration": "Release" - }, { "name": "unix-rel-ninja", "displayName": "Unix Ninja Release Build", "configurePreset": "unix-rel-ninja", "configuration": "Release" - }, - { - "name": "unix-rel-shared", - "displayName": "Unix Make Release Build", - "configurePreset": "unix-rel-shared", - "configuration": "Release" } ] -} +} \ No newline at end of file diff --git a/README.md b/README.md index 6a4c927..183e03d 100644 --- a/README.md +++ b/README.md @@ -726,6 +726,9 @@ We welcome contributions to improve the BankID C++ library! Here's how you can h # Install dependencies conan install . -s build_type=Debug -of=conan/debug --build=missing + + # For release build + conan install . -s build_type=Release -of=conan/release --build=missing ``` 3. **Build and Test** diff --git a/bankid/CMakeLists.txt b/bankid/CMakeLists.txt index e8732de..9d40e89 100644 --- a/bankid/CMakeLists.txt +++ b/bankid/CMakeLists.txt @@ -13,7 +13,16 @@ find_package(OpenSSL REQUIRED) find_package(nlohmann_json REQUIRED) # Create the BankID library (shared/static based on BUILD_SHARED_LIBS) -add_library(bankid_lib ${BANKID_LIB_SOURCES}) +if(BUILD_SHARED_LIBS) + add_library(bankid_lib SHARED ${BANKID_LIB_SOURCES}) + # Set symbol visibility for shared libraries + set_target_properties(bankid_lib PROPERTIES + CXX_VISIBILITY_PRESET hidden + VISIBILITY_INLINES_HIDDEN YES + ) +else() + add_library(bankid_lib STATIC ${BANKID_LIB_SOURCES}) +endif() # Set library properties set_target_properties(bankid_lib PROPERTIES @@ -22,22 +31,24 @@ set_target_properties(bankid_lib PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR} ) -# Set compile definitions for Windows DLL export/import -if(WIN32) - if(BUILD_SHARED_LIBS) - target_compile_definitions(bankid_lib PRIVATE BANKID_EXPORTS) - else() - # For static libraries, we don't need the export/import macros - target_compile_definitions(bankid_lib PUBLIC BANKID_STATIC) - endif() +# Set compile definitions for symbol export/import +if(BUILD_SHARED_LIBS) + target_compile_definitions(bankid_lib PRIVATE BANKID_EXPORTS) + # For consumers of the shared library + target_compile_definitions(bankid_lib INTERFACE BANKID_SHARED) +else() + # For static libraries, we don't need the export/import macros + target_compile_definitions(bankid_lib PUBLIC BANKID_STATIC) endif() + # Include directories for the library target_include_directories(bankid_lib PUBLIC $ $ ) +target_compile_features(bankid_lib PUBLIC cxx_std_23) target_link_libraries(bankid_lib PUBLIC OpenSSL::SSL OpenSSL::Crypto nlohmann_json::nlohmann_json) # Installation rules @@ -51,6 +62,8 @@ install(TARGETS bankid_lib RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) + + # Install headers install(DIRECTORY ${BANKID_INCLUDE_DIR}/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} diff --git a/bankid/bankid.cpp b/bankid/bankid.cpp index 3d708a8..304abe5 100644 --- a/bankid/bankid.cpp +++ b/bankid/bankid.cpp @@ -1,16 +1,11 @@ #include "bankid.h" -// Implementation of file_exists function -bool file_exists(const std::string &path) -{ - return std::filesystem::exists(path); -} namespace BankID { // New Session implementation using SSLConfig only Session::Session(const SSLConfig &sslConfig, const bool showDebugLog) - : m_sslConfig(sslConfig), m_initialized(false), m_cli(nullptr), m_showDebugLog(showDebugLog) + : m_sslConfig(sslConfig), m_cli(nullptr), m_initialized(false), m_showDebugLog(showDebugLog) { m_initialized = initialize(); } @@ -23,7 +18,7 @@ namespace BankID } } - const bool Session::initialize() + bool Session::initialize() { if (!m_sslConfig.validate()) { @@ -115,7 +110,7 @@ namespace BankID } return std::unexpected(BankID::AuthError{ - 500, + {500}, BankID::BankIdErrorCode::NOT_INITIALIZED, "Session not initialized"}); } @@ -149,7 +144,7 @@ namespace BankID } return std::unexpected(AuthError{ - 403, + {403}, BankIdErrorCode::INTERNAL_ERROR, "SSL server verification failed"}); } @@ -171,7 +166,7 @@ namespace BankID catch (const std::exception &e) { return std::unexpected(AuthError{ - res->status, + {res->status}, BankIdErrorCode::INVALID_PARAMETERS, std::string("Failed to parse response: ") + e.what()}); } @@ -182,7 +177,7 @@ namespace BankID if (it != customErrors.end()) { return std::unexpected(AuthError{ - res->status, + {res->status}, BankIdErrorCode::INVALID_PARAMETERS, // Or let caller map their own code it->second}); } @@ -247,7 +242,7 @@ namespace BankID } return std::unexpected(AuthError{ - res->status, + {res->status}, errorCode, res->body}); } @@ -287,7 +282,7 @@ namespace BankID } return std::unexpected(AuthError{ - res->status, + {res->status}, errorCode, std::string("Non-JSON error response: ") + e.what() + " - " + res->body}); } @@ -309,14 +304,14 @@ namespace BankID if (defIt != defaultErrors.end()) { return std::unexpected(AuthError{ - res->status, + {res->status}, defIt->second.first, defIt->second.second}); } // Fallback for unknown codes return std::unexpected(AuthError{ - res->status, + {res->status}, BankIdErrorCode::INTERNAL_ERROR, "Unhandled HTTP error"}); } @@ -374,7 +369,7 @@ namespace BankID { int seconds = getElapsedSeconds(); if (isExpired()) - return std::unexpected(BankID::API::ErrorResponse{404, "QR code expired", "The QR code has expired after 30 seconds."}); + return std::unexpected(BankID::API::ErrorResponse{{404}, "QR code expired", "The QR code has expired after 30 seconds."}); std::string authCode = computeAuthCode(seconds); return "bankid." + m_qr_start_token + "." + std::to_string(seconds) + "." + authCode; diff --git a/bankid/includes/bankid.h b/bankid/includes/bankid.h index 01b4fe8..941a68b 100644 --- a/bankid/includes/bankid.h +++ b/bankid/includes/bankid.h @@ -27,14 +27,16 @@ using json = nlohmann::json; #pragma warning(push) #pragma warning(disable : 4251) #else +#ifdef BANKID_EXPORTS +#define BANKID_API __attribute__((visibility("default"))) +#else #define BANKID_API #endif - -// Forward declaration - implementation in bankid.cpp -bool file_exists(const std::string &path); +#endif namespace BankID { + struct BANKID_API AppConfig { std::string appIdentifier; @@ -88,6 +90,7 @@ namespace BankID } }; + /** SSL configuration structure * This structure contains the SSL configuration for the BankID API. * It includes the environment, CA file path, PEM certificate path, and PEM key path. @@ -147,16 +150,16 @@ namespace BankID std::expected validate() const { // Verify certificate files exist - if (!file_exists(this->pemCertPath)) + if (!std::filesystem::exists(this->pemCertPath)) { return std::unexpected("Certificate file does not exist: " + this->pemCertPath); } - if (!file_exists(this->pemKeyPath)) + if (!std::filesystem::exists(this->pemKeyPath)) { return std::unexpected("Key file does not exist: " + this->pemKeyPath); } - if (!file_exists(this->caFilePath)) + if (!std::filesystem::exists(this->caFilePath)) { return std::unexpected("CA file does not exist: " + this->caFilePath); } @@ -258,7 +261,7 @@ namespace BankID // Get current token bool isInitialized() const { return m_initialized; } - const bool initialize(); + bool initialize(); const SSLConfig &getSSLConfig() const { return m_sslConfig; } private: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1b44379..8450fd3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 3.16) +# Enable testing +enable_testing() + # Find required packages find_package(GTest REQUIRED) find_package(nlohmann_json REQUIRED) @@ -40,24 +43,25 @@ set_target_properties(bankid_tests PROPERTIES CXX_EXTENSIONS OFF ) -# Enable testing -enable_testing() - -# Add test discovery - temporarily disabled to avoid DLL issues -# include(GoogleTest) -# gtest_discover_tests(bankid_tests) +# Handle shared library runtime path (RPATH) on Unix systems +if(BUILD_SHARED_LIBS AND UNIX) + # Set RPATH so the executable can find the shared library + set_target_properties(bankid_tests PROPERTIES + BUILD_RPATH "${CMAKE_BINARY_DIR}/bankid" + INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" + BUILD_WITH_INSTALL_RPATH FALSE + SKIP_BUILD_RPATH FALSE + ) +endif() # Manual test registration as fallback -add_test(NAME AuthTests COMMAND bankid_tests --gtest_filter=AuthTest.*) - -# Add custom test target add_custom_target(run_tests COMMAND bankid_tests DEPENDS bankid_tests WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) -# If using shared libraries on Windows, copy the DLL and dependencies +# Handle DLL copying for Windows shared builds if(WIN32 AND BUILD_SHARED_LIBS) # Create a script to handle DLL copying set(COPY_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/copy_dlls.cmake") @@ -91,6 +95,18 @@ if(WIN32 AND BUILD_SHARED_LIBS) ) endif() +# For Unix shared builds, ensure the library is available at test runtime +if(BUILD_SHARED_LIBS AND UNIX) + # Add a custom command to create a symlink or copy the shared library + add_custom_command(TARGET bankid_tests POST_BUILD + COMMAND ${CMAKE_COMMAND} -E create_symlink + $ + $/lib$ + COMMENT "Creating symlink to shared library in test directory" + VERBATIM + ) +endif() + # Copy certificates folder to output directory for tests add_custom_command(TARGET bankid_tests POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory @@ -99,3 +115,19 @@ add_custom_command(TARGET bankid_tests POST_BUILD COMMENT "Copying certificates folder to tests output directory" VERBATIM ) + +add_test(NAME SSLConfigTest COMMAND bankid_tests --gtest_filter=SSLConfigTest.*) +set_tests_properties(SSLConfigTest PROPERTIES WORKING_DIRECTORY $) + +add_test(NAME AuthTests COMMAND bankid_tests --gtest_filter=AuthTest.*) +set_tests_properties(AuthTests PROPERTIES WORKING_DIRECTORY $) + +add_test(NAME SignTests COMMAND bankid_tests --gtest_filter=SignTest.*) +set_tests_properties(SignTests PROPERTIES WORKING_DIRECTORY $) + +# Set environment variables for tests to find shared libraries +if(BUILD_SHARED_LIBS AND UNIX) + set_tests_properties(SSLConfigTest AuthTests SignTests PROPERTIES + ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/bankid:$ENV{LD_LIBRARY_PATH}" + ) +endif() \ No newline at end of file diff --git a/tests/test_ssl.cpp b/tests/test_ssl.cpp index 18787b0..1c23652 100644 --- a/tests/test_ssl.cpp +++ b/tests/test_ssl.cpp @@ -7,7 +7,7 @@ #include #include -class ConfigParamaters : public ::testing::Test +class SSLConfigTest : public ::testing::Test { protected: void SetUp() override @@ -19,7 +19,7 @@ class ConfigParamaters : public ::testing::Test } }; -TEST_F(ConfigParamaters, BasicDefaultValidConfig) +TEST_F(SSLConfigTest, BasicDefaultValidConfig) { BankID::SSLConfig sslConfig(BankID::Environment::TEST); @@ -27,7 +27,7 @@ TEST_F(ConfigParamaters, BasicDefaultValidConfig) EXPECT_TRUE(sslConfig.validate()); } -TEST_F(ConfigParamaters, BasicDefaultInvalidConfig) +TEST_F(SSLConfigTest, BasicDefaultInvalidConfig) { BankID::SSLConfig sslConfig(BankID::Environment::TEST, "certs/invalid.ca", "certs/bankid_cert.pem", "certs/bankid_key.pem"); @@ -36,7 +36,7 @@ TEST_F(ConfigParamaters, BasicDefaultInvalidConfig) EXPECT_FALSE(sslConfig.validate()); } -TEST_F(ConfigParamaters, CustomConfig) +TEST_F(SSLConfigTest, CustomConfig) { BankID::SSLConfig sslConfig(BankID::Environment::PRODUCTION, "certs/prod.ca", "certs/bankid_cert.pem", "certs/bankid_key.pem"); @@ -45,7 +45,7 @@ TEST_F(ConfigParamaters, CustomConfig) EXPECT_TRUE(sslConfig.validate()); } -TEST_F(ConfigParamaters, SendApiRequestWithValidConfig) +TEST_F(SSLConfigTest, SendApiRequestWithValidConfig) { BankID::SSLConfig sslConfig(BankID::Environment::TEST); @@ -71,7 +71,7 @@ TEST_F(ConfigParamaters, SendApiRequestWithValidConfig) EXPECT_EQ(cancelResponse.value().httpStatus, 200); } -TEST_F(ConfigParamaters, SendApiRequestWithInvalidConfig) +TEST_F(SSLConfigTest, SendApiRequestWithInvalidConfig) { BankID::SSLConfig sslConfig(BankID::Environment::TEST, "certs/prod.ca", "certs/bankid_cert.pem", "certs/bankid_key.pem");